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
@@ -287,7 +288,7 @@ class ModuleSpecList {
287
288
if (this != &rhs) {
288
289
std::lock (m_mutex, rhs.m_mutex );
289
290
std::lock_guard<std::recursive_mutex> lhs_guard (m_mutex, std::adopt_lock);
290
- std::lock_guard<std::recursive_mutex> rhs_guard (rhs.m_mutex ,
291
+ std::lock_guard<std::recursive_mutex> rhs_guard (rhs.m_mutex ,
291
292
std::adopt_lock);
292
293
m_specs = rhs.m_specs ;
293
294
}
@@ -387,8 +388,16 @@ class ModuleSpecList {
387
388
}
388
389
}
389
390
391
+ typedef std::vector<ModuleSpec> collection;
392
+ typedef LockingAdaptedIterable<collection, ModuleSpec, vector_adapter,
393
+ std::recursive_mutex>
394
+ ModuleSpecIterable;
395
+
396
+ ModuleSpecIterable ModuleSpecs () {
397
+ return ModuleSpecIterable (m_specs, m_mutex);
398
+ }
399
+
390
400
protected:
391
- typedef std::vector<ModuleSpec> collection; // /< The module collection type.
392
401
collection m_specs; // /< The collection of modules.
393
402
mutable std::recursive_mutex m_mutex;
394
403
};
You can’t perform that action at this time.
0 commit comments