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

Unified Diff: test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.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/NaCl/Bitcode/pnacl-bcdis/intrinsics.ll ('k') | test/NaCl/Bitcode/pnacl-bcdis/load.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.ll
diff --git a/test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.ll b/test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.ll
new file mode 100644
index 0000000000000000000000000000000000000000..c3f1e88862b6a81e21ce232a8258a41439edeba0
--- /dev/null
+++ b/test/NaCl/Bitcode/pnacl-bcdis/intrinsics-bad-types.ll
@@ -0,0 +1,16 @@
+; Tests calls to intrinsics with bad type signatures.
+
+; RUN: llvm-as < %s | pnacl-freeze | pnacl-bccompress --remove-abbreviations \
+; RUN: | not pnacl-bcdis | FileCheck %s
+
+; Error where return type should be i32.
+declare void @llvm.nacl.setjmp(i8*)
+; CHECK: Error({{.*}}): Intrinsic llvm.nacl.setjmp expects return type i32. Found: void
+
+; Error where type of 2nd parameter is wrong (should be i32).
+declare i32 @llvm.nacl.atomic.load.i32(i32*, i64)
+; CHECK: Error({{.*}}): Intrinsic llvm.nacl.atomic.load.i32 expects i32 for argument 2. Found: i64
+
+; Error where too many arguments are specified.
+declare void @llvm.nacl.atomic.store.i64(i64, i64*, i32, i32)
+; CHECK: Error({{.*}}): Intrinsic llvm.nacl.atomic.store.i64 expects 3 arguments. Found: 4
« no previous file with comments | « test/NaCl/Bitcode/pnacl-bcdis/intrinsics.ll ('k') | test/NaCl/Bitcode/pnacl-bcdis/load.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698