aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-11-11 23:09:31 +0000
committerReid Kleckner <rnk@google.com>2015-11-11 23:09:31 +0000
commitb9204a584c4494d3b057ef4ff8795572023eebbe (patch)
tree9b3da1d20bbaddc98a4a4b2b77eb371f778bb5e5 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentf93fff27f0d4f848e79fd695d126a0abf264d9c4 (diff)
downloadllvm-b9204a584c4494d3b057ef4ff8795572023eebbe.zip
llvm-b9204a584c4494d3b057ef4ff8795572023eebbe.tar.gz
llvm-b9204a584c4494d3b057ef4ff8795572023eebbe.tar.bz2
[WinEH] Don't forward branches across empty EH pad BBs
For really simple SEH catchpads, we tried to forward the invoke unwind edge across the empty block. llvm-svn: 252822
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 8e11979..44dbf9f 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -52,6 +52,7 @@ MCSymbol *MachineBasicBlock::getSymbol() const {
const MachineFunction *MF = getParent();
MCContext &Ctx = MF->getContext();
const char *Prefix = Ctx.getAsmInfo()->getPrivateLabelPrefix();
+ assert(getNumber() >= 0 && "cannot get label for unreachable MBB");
CachedMCSymbol = Ctx.getOrCreateSymbol(Twine(Prefix) + "BB" +
Twine(MF->getFunctionNumber()) +
"_" + Twine(getNumber()));