}
MCContext::~MCContext() {
- // Call the destructors so the fragments are freed
- for (auto &I : ELFUniquingMap)
- I.second->~MCSectionELF();
- for (auto &I : COFFUniquingMap)
- I.second->~MCSectionCOFF();
- for (auto &I : MachOUniquingMap)
- I.second->~MCSectionMachO();
-
if (AutoReset)
reset();
//===----------------------------------------------------------------------===//
void MCContext::reset() {
+ // Call the destructors so the fragments are freed
+ for (auto &I : ELFUniquingMap)
+ I.second->~MCSectionELF();
+ for (auto &I : COFFUniquingMap)
+ I.second->~MCSectionCOFF();
+ for (auto &I : MachOUniquingMap)
+ I.second->~MCSectionMachO();
+
UsedNames.clear();
Symbols.clear();
Allocator.Reset();