[MC] Destroy WasmAllocator in MCContext::reset
authorFangrui Song <i@maskray.me>
Sat, 12 Mar 2022 03:55:07 +0000 (19:55 -0800)
committerFangrui Song <i@maskray.me>
Sat, 12 Mar 2022 03:55:07 +0000 (19:55 -0800)
To not leave lingering getWasmSection instances.

llvm/lib/MC/MCContext.cpp

index 94992f7..c808a32 100644 (file)
@@ -141,6 +141,7 @@ void MCContext::reset() {
   ELFAllocator.DestroyAll();
   GOFFAllocator.DestroyAll();
   MachOAllocator.DestroyAll();
+  WasmAllocator.DestroyAll();
   XCOFFAllocator.DestroyAll();
   MCInstAllocator.DestroyAll();