diff options
| author | Tim Northover <tnorthover@apple.com> | 2017-01-27 23:54:31 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2017-01-27 23:54:31 +0000 |
| commit | 12bd22fbee2e54fe45a28d12bcd10e640d78d457 (patch) | |
| tree | 374f01b5cd4d8ba3abf93ec26ce7a34684a17d48 /llvm/lib/CodeGen | |
| parent | 8bf0633288efd776824c1a21ea5da2b9cb43e69a (diff) | |
| download | bcm5719-llvm-12bd22fbee2e54fe45a28d12bcd10e640d78d457.tar.gz bcm5719-llvm-12bd22fbee2e54fe45a28d12bcd10e640d78d457.zip | |
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.
llvm-svn: 293347
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 9382de77f88..1a667d60166 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -965,6 +965,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) { // Get rid of the now empty basic block. EntryBB->removeSuccessor(&NewEntryBB); MF->remove(EntryBB); + MF->DeleteMachineBasicBlock(EntryBB); assert(&MF->front() == &NewEntryBB && "New entry wasn't next in the list of basic block!"); |

