[llvm] 121191c - [MC] Destroy WasmAllocator in MCContext::reset

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 19:55:13 PST 2022


Author: Fangrui Song
Date: 2022-03-11T19:55:07-08:00
New Revision: 121191cecbf1687a647967e34123f63e85228e99

URL: https://github.com/llvm/llvm-project/commit/121191cecbf1687a647967e34123f63e85228e99
DIFF: https://github.com/llvm/llvm-project/commit/121191cecbf1687a647967e34123f63e85228e99.diff

LOG: [MC] Destroy WasmAllocator in MCContext::reset

To not leave lingering getWasmSection instances.

Added: 
    

Modified: 
    llvm/lib/MC/MCContext.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 94992f7bc16ce..c808a321f8cdb 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -141,6 +141,7 @@ void MCContext::reset() {
   ELFAllocator.DestroyAll();
   GOFFAllocator.DestroyAll();
   MachOAllocator.DestroyAll();
+  WasmAllocator.DestroyAll();
   XCOFFAllocator.DestroyAll();
   MCInstAllocator.DestroyAll();
 


        


More information about the llvm-commits mailing list