aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2013-07-22 10:44:21 -0700
committerJan Voung <jvoung@chromium.org>2013-07-22 10:44:21 -0700
commit9b2942831f43dd9a5802565b9996bdf2c0bfd896 (patch)
treeff2e17be3f7b1cb805543e436624e4d04e13a70f /test
parent1856bd7d7cb47f7ae32b7c848a8df5c28281e424 (diff)
Disallow dev/private intrinsics by default (only llvm.nacl.target.arch remains)
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3525 R=jfb@chromium.org Review URL: https://codereview.chromium.org/19668004
Diffstat (limited to 'test')
-rw-r--r--test/NaCl/PNaClABI/abi-debug-info.ll7
-rw-r--r--test/NaCl/PNaClABI/intrinsics.ll24
2 files changed, 20 insertions, 11 deletions
diff --git a/test/NaCl/PNaClABI/abi-debug-info.ll b/test/NaCl/PNaClABI/abi-debug-info.ll
index 49b31bab91..884cdc224f 100644
--- a/test/NaCl/PNaClABI/abi-debug-info.ll
+++ b/test/NaCl/PNaClABI/abi-debug-info.ll
@@ -1,10 +1,7 @@
-; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=0 < %s | FileCheck %s
-; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=0 \
-; RUN: -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check-prefix=DBG
-; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=1 < %s | \
+; RUN: pnacl-abicheck < %s | FileCheck %s
+; RUN: pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | \
; RUN: FileCheck %s --check-prefix=DBG
-
; DBG-NOT: disallowed
diff --git a/test/NaCl/PNaClABI/intrinsics.ll b/test/NaCl/PNaClABI/intrinsics.ll
index 9e02511794..3e9d830623 100644
--- a/test/NaCl/PNaClABI/intrinsics.ll
+++ b/test/NaCl/PNaClABI/intrinsics.ll
@@ -1,17 +1,29 @@
-; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=0 < %s | FileCheck %s
-; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=0 \
-; RUN: -pnaclabi-allow-debug-metadata < %s | FileCheck %s --check-prefix=DBG
-; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics=1 < %s | \
+; RUN: pnacl-abicheck < %s | FileCheck %s
+; RUN: pnacl-abicheck -pnaclabi-allow-debug-metadata < %s | \
+; RUN: FileCheck %s --check-prefix=DBG
+; RUN: pnacl-abicheck -pnaclabi-allow-dev-intrinsics < %s | \
; RUN: FileCheck %s --check-prefix=DEV
; Test that only white-listed intrinsics are allowed.
; ===================================
-; Some disallowed "Dev" intrinsics.
+; Some "Dev" intrinsics which are disallowed by default.
+
+; CHECK: Function llvm.nacl.target.arch is a disallowed LLVM intrinsic
+; DEV-NOT: Function llvm.nacl.target.arch is a disallowed LLVM intrinsic
+declare i32 @llvm.nacl.target.arch()
+
+
+; ===================================
+; Debug info intrinsics, which are disallowed by default.
+
; CHECK: Function llvm.dbg.value is a disallowed LLVM intrinsic
; DBG-NOT: Function llvm.dbg.value is a disallowed LLVM intrinsic
-; DEV-NOT: Function llvm.dbg.value is a disallowed LLVM intrinsic
declare void @llvm.dbg.value(metadata, i64, metadata)
+; CHECK: Function llvm.dbg.declare is a disallowed LLVM intrinsic
+; DBG-NOT: Function llvm.dbg.declare is a disallowed LLVM intrinsic
+declare void @llvm.dbg.declare(metadata, metadata)
+
; ===================================
; Always allowed intrinsics.