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

Unified Diff: test/Transforms/NaCl/rewrite-setjmp-store-error.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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
« no previous file with comments | « test/Transforms/NaCl/rewrite-prefetch.ll ('k') | test/Transforms/NaCl/rewrite-setlongjmp-calls.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/rewrite-setjmp-store-error.ll
diff --git a/test/Transforms/NaCl/rewrite-setjmp-store-error.ll b/test/Transforms/NaCl/rewrite-setjmp-store-error.ll
new file mode 100644
index 0000000000000000000000000000000000000000..05d7dedefba351a5c33e44683ba2d32a17fd5a80
--- /dev/null
+++ b/test/Transforms/NaCl/rewrite-setjmp-store-error.ll
@@ -0,0 +1,13 @@
+; RUN: not opt < %s -rewrite-pnacl-library-calls -S 2>&1 | FileCheck %s
+; Test that the pass enforces not being able to store the address
+; of setjmp.
+
+declare i32 @setjmp(i64*)
+
+define i32 @takeaddr_setjmp(i64* %arg) {
+ %fp = alloca i32 (i64*)*, align 8
+; CHECK: Taking the address of setjmp is invalid
+ store i32 (i64*)* @setjmp, i32 (i64*)** %fp, align 8
+ ret i32 7
+}
+
« no previous file with comments | « test/Transforms/NaCl/rewrite-prefetch.ll ('k') | test/Transforms/NaCl/rewrite-setlongjmp-calls.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698