Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: test/Transforms/NaCl/simplify-struct-reg-pad-crash.ll

Issue 992493002: Lower signatures exposing struct registers to byval struct pointers (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: landing pads Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+}

Powered by Google App Engine
This is Rietveld 408576698