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

Unified Diff: test/Transforms/NaCl/rewrite-longjmp-no-store.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
Index: test/Transforms/NaCl/rewrite-longjmp-no-store.ll
diff --git a/test/Transforms/NaCl/rewrite-longjmp-no-store.ll b/test/Transforms/NaCl/rewrite-longjmp-no-store.ll
new file mode 100644
index 0000000000000000000000000000000000000000..134593ad397155123d921ee14f334cd05f68f9ff
--- /dev/null
+++ b/test/Transforms/NaCl/rewrite-longjmp-no-store.ll
@@ -0,0 +1,16 @@
+; RUN: opt < %s -rewrite-pnacl-library-calls -S | FileCheck %s
+; RUN: opt < %s -rewrite-pnacl-library-calls -S | FileCheck %s -check-prefix=CLEANED
+; Test that when there are no uses other than calls to longjmp,
+; no function body is generated.
+
+declare void @longjmp(i64*, i32)
+
+; No declaration or definition of longjmp() should remain.
+; CLEANED-NOT: @longjmp
+
+define void @call_longjmp(i64* %arg, i32 %num) {
+ call void @longjmp(i64* %arg, i32 %num)
+; CHECK: call void @llvm.nacl.longjmp(i8* %jmp_buf_i8, i32 %num)
+ ret void
+}
+
« no previous file with comments | « test/Transforms/NaCl/rewrite-libcalls-wrong-signature.ll ('k') | test/Transforms/NaCl/rewrite-longjmp-noncall-uses.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698