summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/inline-asm.c
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2015-01-16 23:05:28 +0000
committerSteven Wu <stevenwu@apple.com>2015-01-16 23:05:28 +0000
commitcb0d13fc2337966a7e8738082309be1e215f83f3 (patch)
tree9c127e06ea4c5d5e9606a4d2c4f3808767face49 /clang/test/Driver/inline-asm.c
parenta34d04d35e72c9104c32e2f772b8bccab7f0cd33 (diff)
downloadbcm5719-llvm-cb0d13fc2337966a7e8738082309be1e215f83f3.tar.gz
bcm5719-llvm-cb0d13fc2337966a7e8738082309be1e215f83f3.zip
Adding option -fno-inline-asm to disallow inline asm
Summary: This patch add a new option to dis-allow all inline asm. Any GCC style inline asm will be reported as an error. Reviewers: rnk, echristo Reviewed By: rnk, echristo Subscribers: bob.wilson, rnk, echristo, rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D6870 llvm-svn: 226340
Diffstat (limited to 'clang/test/Driver/inline-asm.c')
-rw-r--r--clang/test/Driver/inline-asm.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/Driver/inline-asm.c b/clang/test/Driver/inline-asm.c
new file mode 100644
index 00000000000..bafd03d694f
--- /dev/null
+++ b/clang/test/Driver/inline-asm.c
@@ -0,0 +1,24 @@
+// RUN: %clang -target x86_64-apple-darwin10 \
+// RUN: -### -fsyntax-only -fasm-blocks %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-BLOCKS < %t %s
+
+// RUN: %clang -target x86_64-apple-darwin10 \
+// RUN: -### -fsyntax-only -fno-asm-blocks -fasm-blocks %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-BLOCKS < %t %s
+
+// CHECK-BLOCKS: "-fasm-blocks"
+
+// RUN: %clang -target x86_64-apple-darwin10 \
+// RUN: -### -fsyntax-only -fasm-blocks -fno-asm-blocks %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-NO-BLOCKS < %t %s
+
+// CHECK-NO-BLOCKS-NOT: "-fasm-blocks"
+
+// RUN: %clang -target x86_64-apple-darwin10 \
+// RUN: -### -fsyntax-only -fno-gnu-inline-asm %s 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK-NO-GNU-INLINE-ASM %s
+// RUN: %clang -target x86_64-apple-darwin10 \
+// RUN: -### -fsyntax-only -fgnu-inline-asm -fno-gnu-inline-asm %s 2>&1 | \
+// RUN: FileCheck --check-prefix=CHECK-NO-GNU-INLINE-ASM %s
+
+// CHECK-NO-GNU-INLINE-ASM: "-fno-gnu-inline-asm"
OpenPOWER on IntegriCloud