summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_common.h')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_common.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common.h b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
index 2000e6c7f6a..47b02b149d3 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common.h
@@ -727,10 +727,9 @@ class LoadedModule {
// filling this information.
class ListOfModules {
public:
- ListOfModules() {}
+ ListOfModules() : modules_(kInitialCapacity) {}
~ListOfModules() { clear(); }
void init();
- void fallbackInit(); // Uses fallback init if available, otherwise clears
const LoadedModule *begin() const { return modules_.begin(); }
LoadedModule *begin() { return modules_.begin(); }
const LoadedModule *end() const { return modules_.end(); }
@@ -746,11 +745,8 @@ class ListOfModules {
for (auto &module : modules_) module.clear();
modules_.clear();
}
- void clearOrInit() {
- modules_.capacity() ? clear() : modules_.Initialize(kInitialCapacity);
- }
- InternalMmapVectorNoCtor<LoadedModule> modules_;
+ InternalMmapVector<LoadedModule> modules_;
// We rarely have more than 16K loaded modules.
static const uptr kInitialCapacity = 1 << 14;
};
OpenPOWER on IntegriCloud