diff options
author | Joseph Tremoulet <jotrem@microsoft.com> | 2016-01-02 15:24:24 +0000 |
---|---|---|
committer | Joseph Tremoulet <jotrem@microsoft.com> | 2016-01-02 15:24:24 +0000 |
commit | 06125e52a7de61fcac60f2900aa4c58652dfa552 (patch) | |
tree | a3571cef7dcea7c6faef5b08abb475bcda6fa724 /llvm/lib/IR/Verifier.cpp | |
parent | 71e5676de4d30bbff60f496912db1036f8956430 (diff) | |
download | bcm5719-llvm-06125e52a7de61fcac60f2900aa4c58652dfa552.tar.gz bcm5719-llvm-06125e52a7de61fcac60f2900aa4c58652dfa552.zip |
[WinEH] Tighten parentPad verifier checks
Summary: A catchswitch cannot be a parent of a cleanuppad or another catchswitch.
Reviewers: rnk, andrew.w.kaylor, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15841
llvm-svn: 256690
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 81c87e4759b..a7a291dbf9d 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -3019,8 +3019,7 @@ void Verifier::visitCleanupPadInst(CleanupPadInst &CPI) { &CPI); auto *ParentPad = CPI.getParentPad(); - Assert(isa<CatchSwitchInst>(ParentPad) || isa<ConstantTokenNone>(ParentPad) || - isa<CleanupPadInst>(ParentPad) || isa<CatchPadInst>(ParentPad), + Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad), "CleanupPadInst has an invalid parent.", &CPI); User *FirstUser = nullptr; @@ -3077,8 +3076,7 @@ void Verifier::visitCatchSwitchInst(CatchSwitchInst &CatchSwitch) { } auto *ParentPad = CatchSwitch.getParentPad(); - Assert(isa<CatchSwitchInst>(ParentPad) || isa<ConstantTokenNone>(ParentPad) || - isa<CleanupPadInst>(ParentPad) || isa<CatchPadInst>(ParentPad), + Assert(isa<ConstantTokenNone>(ParentPad) || isa<FuncletPadInst>(ParentPad), "CatchSwitchInst has an invalid parent.", ParentPad); visitTerminatorInst(CatchSwitch); |