summaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-09-21 22:57:02 +0000
committerBill Wendling <isanbard@gmail.com>2011-09-21 22:57:02 +0000
commitcccfd194ecf8e1c6fb203ec3f96aca8cfe9e0484 (patch)
treed26849579123ad1c87f90e205a0ed078ac085c65 /lib/VMCore
parentafbaf48fc4a645a95737ea81e2e0fde47a6150ba (diff)
downloadexternal_llvm-cccfd194ecf8e1c6fb203ec3f96aca8cfe9e0484.zip
external_llvm-cccfd194ecf8e1c6fb203ec3f96aca8cfe9e0484.tar.gz
external_llvm-cccfd194ecf8e1c6fb203ec3f96aca8cfe9e0484.tar.bz2
The last verification check for the new EH model.
This makes sure that the unwind destination of an invoke is a landing pad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Verifier.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 7635998..5936d80 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1167,6 +1167,12 @@ void Verifier::visitCallInst(CallInst &CI) {
void Verifier::visitInvokeInst(InvokeInst &II) {
VerifyCallSite(&II);
+
+ // Verify that there is a landingpad instruction as the first non-PHI
+ // instruction of the 'unwind' destination.
+ Assert1(II.getUnwindDest()->isLandingPad(),
+ "The unwind destination does not have a landingpad instruction!",&II);
+
visitTerminatorInst(II);
}