File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 13
13
#include " lldb/Target/PathMappingList.h"
14
14
#include " lldb/Utility/ArchSpec.h"
15
15
#include " lldb/Utility/FileSpec.h"
16
+ #include " lldb/Utility/Iterable.h"
16
17
#include " lldb/Utility/Stream.h"
17
18
#include " lldb/Utility/UUID.h"
18
19
@@ -293,7 +294,7 @@ class ModuleSpecList {
293
294
if (this != &rhs) {
294
295
std::lock (m_mutex, rhs.m_mutex );
295
296
std::lock_guard<std::recursive_mutex> lhs_guard (m_mutex, std::adopt_lock);
296
- std::lock_guard<std::recursive_mutex> rhs_guard (rhs.m_mutex ,
297
+ std::lock_guard<std::recursive_mutex> rhs_guard (rhs.m_mutex ,
297
298
std::adopt_lock);
298
299
m_specs = rhs.m_specs ;
299
300
}
@@ -393,8 +394,16 @@ class ModuleSpecList {
393
394
}
394
395
}
395
396
397
+ typedef std::vector<ModuleSpec> collection;
398
+ typedef LockingAdaptedIterable<collection, ModuleSpec, vector_adapter,
399
+ std::recursive_mutex>
400
+ ModuleSpecIterable;
401
+
402
+ ModuleSpecIterable ModuleSpecs () {
403
+ return ModuleSpecIterable (m_specs, m_mutex);
404
+ }
405
+
396
406
protected:
397
- typedef std::vector<ModuleSpec> collection; // /< The module collection type.
398
407
collection m_specs; // /< The collection of modules.
399
408
mutable std::recursive_mutex m_mutex;
400
409
};
You can’t perform that action at this time.
0 commit comments