diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-08-15 02:46:08 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-08-15 02:46:08 +0000 |
| commit | 0bc0eef71c09ddc0c7ef73a0dc54a7875c965c03 (patch) | |
| tree | a785179c274e965ce43e8f3a83f13ffd05b5e1f6 /llvm/test/Feature | |
| parent | 5567bafe93d8dfce39c4f9fa909165ef9ff0c30f (diff) | |
| download | bcm5719-llvm-0bc0eef71c09ddc0c7ef73a0dc54a7875c965c03.tar.gz bcm5719-llvm-0bc0eef71c09ddc0c7ef73a0dc54a7875c965c03.zip | |
[IR] Give catchret an optional 'return value' operand
Some personality routines require funclet exit points to be clearly
marked, this is done by producing a token at the funclet pad and
consuming it at the corresponding ret instruction. CleanupReturnInst
already had a spot for this operand but CatchReturnInst did not.
Other personality routines don't need to use this which is why it has
been made optional.
llvm-svn: 245149
Diffstat (limited to 'llvm/test/Feature')
| -rw-r--r-- | llvm/test/Feature/exception.ll | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/test/Feature/exception.ll b/llvm/test/Feature/exception.ll index dbbe7e41edb..e2635c2de42 100644 --- a/llvm/test/Feature/exception.ll +++ b/llvm/test/Feature/exception.ll @@ -63,7 +63,7 @@ define void @catchret() personality i32 (...)* @__gxx_personality_v0 { entry: br label %bb bb: - catchret label %bb + catchret void to label %bb } define i8 @catchpad() personality i32 (...)* @__gxx_personality_v0 { @@ -72,11 +72,16 @@ entry: try.cont: invoke void @_Z3quxv() optsize - to label %bb unwind label %bb2 + to label %exit unwind label %bb2 bb: + catchret token %cbv to label %exit + +exit: ret i8 0 bb2: - %cbv = catchpad i8 [i7 4] to label %bb unwind label %bb2 + %cbv = catchpad token [i7 4] to label %bb unwind label %bb3 +bb3: + catchendpad unwind to caller } define void @terminatepad0() personality i32 (...)* @__gxx_personality_v0 { |

