[ARM] Add doFinalization() to ARMCodeGenPrepare pass.

Attempt to fix the leak introduced in r337687 and make sanitizer
buildbots green again.

llvm-svn: 337709
This commit is contained in:
Matt Morehouse 2018-07-23 17:00:45 +00:00
parent eac2ca4e28
commit a70685f63a
1 changed files with 6 additions and 0 deletions

View 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",