]> granicus.if.org Git - llvm/commitdiff
[ARM] Add doFinalization() to ARMCodeGenPrepare pass.
authorMatt Morehouse <mascasa@google.com>
Mon, 23 Jul 2018 17:00:45 +0000 (17:00 +0000)
committerMatt Morehouse <mascasa@google.com>
Mon, 23 Jul 2018 17:00:45 +0000 (17:00 +0000)
Attempt to fix the leak introduced in r337687 and make sanitizer
buildbots green again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337709 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMCodeGenPrepare.cpp

index a450b15f30e8b093036f9fb18f775e03533cf63c..39b9813feec95f46bdccaae6a4e8f2899e25399e 100644 (file)
@@ -108,6 +108,7 @@ public:
 
   bool doInitialization(Module &M) override;
   bool runOnFunction(Function &F) override;
+  bool doFinalization(Module &M) override;
 };
 
 }
@@ -734,6 +735,11 @@ bool ARMCodeGenPrepare::runOnFunction(Function &F) {
   return MadeChange;
 }
 
+bool ARMCodeGenPrepare::doFinalization(Module &M) {
+  delete Promoter;
+  return false;
+}
+
 INITIALIZE_PASS_BEGIN(ARMCodeGenPrepare, DEBUG_TYPE,
                       "ARM IR optimizations", false, false)
 INITIALIZE_PASS_END(ARMCodeGenPrepare, DEBUG_TYPE, "ARM IR optimizations",