projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[WinEH] Fix catchpad pred verification
[oota-llvm.git]
/
lib
/
IR
/
Verifier.cpp
diff --git
a/lib/IR/Verifier.cpp
b/lib/IR/Verifier.cpp
index a99927065d0e7ee7e00365a995a86ad81ba008a1..9198b0e1fb587f4df09dd5c64ace9e647757e0c5 100644
(file)
--- a/
lib/IR/Verifier.cpp
+++ b/
lib/IR/Verifier.cpp
@@
-2996,6
+2996,9
@@
void Verifier::visitEHPadPredecessors(Instruction &I) {
"Block containg CatchPadInst must be jumped to "
"only by its catchswitch.",
CPI);
+ Assert(BB != CPI->getCatchSwitch()->getUnwindDest(),
+ "Catchswitch cannot unwind to one of its catchpads",
+ CPI->getCatchSwitch(), CPI);
return;
}