summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/no-gnu-inline-asm.c
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2015-05-11 21:14:09 +0000
committerSteven Wu <stevenwu@apple.com>2015-05-11 21:14:09 +0000
commit6b72a6753be823440035d1a4645add9c6048e136 (patch)
tree5e7422c5bb354f21448639fa58920b0bbc23fd70 /clang/test/Parser/no-gnu-inline-asm.c
parente76e7e9369ca1b8309d15e26b31a2bf24b311ed7 (diff)
downloadbcm5719-llvm-6b72a6753be823440035d1a4645add9c6048e136.tar.gz
bcm5719-llvm-6b72a6753be823440035d1a4645add9c6048e136.zip
Allow AsmLabel with -fno-gnu-inline-asm
Summary: AsmLabel is heavily used in system level and firmware to redirect function and access platform specific labels. They are also extensively used in system headers which makes this option unusable for many users. Since AsmLabel doesn't introduce any assembly code into the output binary, it shouldn't be considered as inline-asm. Reviewers: bob.wilson, rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9679 llvm-svn: 237048
Diffstat (limited to 'clang/test/Parser/no-gnu-inline-asm.c')
-rw-r--r--clang/test/Parser/no-gnu-inline-asm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Parser/no-gnu-inline-asm.c b/clang/test/Parser/no-gnu-inline-asm.c
index d73d6123a0e..7089fa4b7df 100644
--- a/clang/test/Parser/no-gnu-inline-asm.c
+++ b/clang/test/Parser/no-gnu-inline-asm.c
@@ -1,6 +1,10 @@
// RUN: %clang_cc1 %s -triple i686-apple-darwin -verify -fsyntax-only -fno-gnu-inline-asm
asm ("INST r1, 0"); // expected-error {{GNU-style inline assembly is disabled}}
+
+void foo() __asm("__foo_func"); // AsmLabel is OK
+int foo1 asm("bar1") = 0; // OK
+
void f (void) {
long long foo = 0, bar;
asm volatile("INST %0, %1" : "=r"(foo) : "r"(bar)); // expected-error {{GNU-style inline assembly is disabled}}
OpenPOWER on IntegriCloud