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

Unified Diff: tests_lit/parse_errs/nacl-fake-intrinsic.ll

Issue 735513002: Create local config file for subzero reader tests. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 6 years, 1 month 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: tests_lit/parse_errs/nacl-fake-intrinsic.ll
diff --git a/tests_lit/parse_errs/nacl-fake-intrinsic.ll b/tests_lit/parse_errs/nacl-fake-intrinsic.ll
new file mode 100644
index 0000000000000000000000000000000000000000..4d5d9eb01fa09a1f0aea22966e9e78ae1b439ded
--- /dev/null
+++ b/tests_lit/parse_errs/nacl-fake-intrinsic.ll
@@ -0,0 +1,34 @@
+; Tests that we don't get fooled by a fake NaCl intrinsic.
+
+; TODO(kschimpf) Find way to run this through p2i. Note: Can't do this
+; currently because run-llvm2ice.py raises exception on error,
+; and output is lost.
+; RUN: %if --need=allow_dump --command llvm-as < %s \
+; RUN: | %if --need=allow_dump --command pnacl-freeze \
+; RUN -allow-local-symbol-tables \
+; RUN: | %if --need=allow_dump --command not %llvm2ice -notranslate \
+; RUN: -verbose=inst -build-on-read \
+; RUN: -allow-pnacl-reader-error-recovery \
+; RUN: -allow-local-symbol-tables \
+; RUN: | %if --need=allow_dump --command FileCheck %s
+
+; RUN: %if --need=no_dump --command llvm-as < %s \
+; RUN: | %if --need=no_dump --command pnacl-freeze \
+; RUN -allow-local-symbol-tables \
+; RUN: | %if --need=no_dump --command not %llvm2ice -notranslate \
+; RUN: -verbose=inst -build-on-read \
+; RUN: -allow-pnacl-reader-error-recovery \
+; RUN: -allow-local-symbol-tables \
+; RUN: | %if --need=no_dump --command FileCheck %s --check-prefix=MIN
+
+declare i32 @llvm.fake.i32(i32)
+
+define i32 @testFake(i32 %v) {
+ %r = call i32 @llvm.fake.i32(i32 %v)
+ ret i32 %r
+}
+
+; CHECK: Error: ({{.*}}) Invalid PNaCl intrinsic call to llvm.fake.i32
+; MIN: Error: ({{.*}}) Invalid function record: <34 0 3 1>
+
Jim Stichnoth 2014/11/19 19:21:00 Git is unhappy with extra blank lines at the end o
Karl 2014/11/20 17:32:09 Done.
+

Powered by Google App Engine
This is Rietveld 408576698