Chromium Code Reviews| Index: test/Transforms/NaCl/simplify-struct-reg-pad-crash.ll |
| diff --git a/test/Transforms/NaCl/simplify-struct-reg-pad-crash.ll b/test/Transforms/NaCl/simplify-struct-reg-pad-crash.ll |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..96e9be06a03f5617474b7783f780dbb8b6677b80 |
| --- /dev/null |
| +++ b/test/Transforms/NaCl/simplify-struct-reg-pad-crash.ll |
| @@ -0,0 +1,23 @@ |
| +; RUN: not opt < %s -simplify-struct-reg-signatures -S |
| +; REQUIRES: asserts |
|
JF
2015/03/20 16:41:32
Do you actually need this? It'll still crash even
Mircea Trofin
2015/03/20 18:31:32
Done.
|
| + |
| +%struct = type { i32, i32 } |
| + |
| +declare i32 @__hypothetical_personality_1(%struct) |
| +declare %struct @__hypothetical_personality_2(i32) |
|
Mircea Trofin
2015/03/20 00:07:24
I'll remove this second personality, actually. I c
|
| + |
| +declare void @something_to_invoke() |
| + |
| +; landingpad with struct |
| +define void @landingpad_is_struct() { |
| + invoke void @something_to_invoke() |
| + to label %OK unwind label %Err |
| + |
| +OK: |
| + ret void |
| + |
| +Err: |
| + %exn = landingpad i32 personality i32(%struct)* @__hypothetical_personality_1 |
| + cleanup |
| + resume i32 %exn |
| +} |