diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-08-11 02:48:30 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-08-11 02:48:30 +0000 |
commit | 85a549dbc86a17f2e3ed2785528aebb089cc46fb (patch) | |
tree | 280a4e966b8b546e6035048d14f325510e5eab16 /llvm/test/Feature/exception.ll | |
parent | ef172fc9f003e5ad6f8ed10eb799879b99076e19 (diff) | |
download | bcm5719-llvm-85a549dbc86a17f2e3ed2785528aebb089cc46fb.tar.gz bcm5719-llvm-85a549dbc86a17f2e3ed2785528aebb089cc46fb.zip |
[IR] Verify EH pad predecessors
Make sure that an EH pad's predecessors are using their unwind edge to
transfer control to the EH pad.
llvm-svn: 244563
Diffstat (limited to 'llvm/test/Feature/exception.ll')
-rw-r--r-- | llvm/test/Feature/exception.ll | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/llvm/test/Feature/exception.ll b/llvm/test/Feature/exception.ll index 027f9619470..dbbe7e41edb 100644 --- a/llvm/test/Feature/exception.ll +++ b/llvm/test/Feature/exception.ll @@ -28,7 +28,11 @@ declare i32 @__gxx_personality_v0(...) define void @cleanupret0() personality i32 (...)* @__gxx_personality_v0 { entry: - br label %bb + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb bb: cleanuppad void [i7 4] cleanupret i8 0 unwind label %bb @@ -36,7 +40,11 @@ bb: define void @cleanupret1() personality i32 (...)* @__gxx_personality_v0 { entry: - br label %bb + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb bb: cleanuppad void [i7 4] cleanupret void unwind label %bb @@ -60,39 +68,69 @@ bb: define i8 @catchpad() personality i32 (...)* @__gxx_personality_v0 { entry: - br label %bb2 + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %bb unwind label %bb2 bb: - ret i8 %cbv + ret i8 0 bb2: %cbv = catchpad i8 [i7 4] to label %bb unwind label %bb2 } define void @terminatepad0() personality i32 (...)* @__gxx_personality_v0 { entry: - br label %bb + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb bb: terminatepad [i7 4] unwind label %bb } define void @terminatepad1() personality i32 (...)* @__gxx_personality_v0 { entry: + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb +bb: terminatepad [i7 4] unwind to caller } define void @cleanuppad() personality i32 (...)* @__gxx_personality_v0 { entry: + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb +bb: cleanuppad void [i7 4] ret void } define void @catchendpad0() personality i32 (...)* @__gxx_personality_v0 { entry: - br label %bb + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb bb: catchendpad unwind label %bb } define void @catchendpad1() personality i32 (...)* @__gxx_personality_v0 { entry: + br label %try.cont + +try.cont: + invoke void @_Z3quxv() optsize + to label %try.cont unwind label %bb +bb: catchendpad unwind to caller } |