1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Fix Regression/Verifier/invoke-1.ll

llvm-svn: 32722
This commit is contained in:
Chris Lattner 2006-12-20 21:20:13 +00:00
parent 6f0a54bd18
commit 7329276511

View File

@ -902,6 +902,10 @@ void Verifier::visitInstruction(Instruction &I) {
if (InvokeInst *II = dyn_cast<InvokeInst>(Op)) { if (InvokeInst *II = dyn_cast<InvokeInst>(Op)) {
OpBlock = II->getNormalDest(); OpBlock = II->getNormalDest();
Assert2(OpBlock != II->getUnwindDest(),
"No uses of invoke possible due to dominance structure!",
Op, II);
// If the normal successor of an invoke instruction has multiple // If the normal successor of an invoke instruction has multiple
// predecessors, then the normal edge from the invoke is critical, so // predecessors, then the normal edge from the invoke is critical, so
// the invoke value can only be live if the destination block // the invoke value can only be live if the destination block
@ -931,8 +935,9 @@ void Verifier::visitInstruction(Instruction &I) {
} }
} }
} }
Assert1(!Bad, Assert2(!Bad,
"Invoke value defined on critical edge but not dead!", &I); "Invoke value defined on critical edge but not dead!", &I,
Op);
} }
} else if (OpBlock == BB) { } else if (OpBlock == BB) {
// If they are in the same basic block, make sure that the definition // If they are in the same basic block, make sure that the definition