Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit bf98c57

Browse files
committed
GlobalISel: don't leak super-entry BB when merging with IR-level one.
We have to delete the block manually or it leaks. That triggers failures in -fsanitize=leak bots (unsurprisingly), which should be fixed by this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293347 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 1ca1d27 commit bf98c57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
965965
// Get rid of the now empty basic block.
966966
EntryBB->removeSuccessor(&NewEntryBB);
967967
MF->remove(EntryBB);
968+
MF->DeleteMachineBasicBlock(EntryBB);
968969

969970
assert(&MF->front() == &NewEntryBB &&
970971
"New entry wasn't next in the list of basic block!");

0 commit comments

Comments
 (0)