summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
diff options
context:
space:
mode:
authorSteven Wu <stevenwu@apple.com>2015-05-12 00:16:37 +0000
committerSteven Wu <stevenwu@apple.com>2015-05-12 00:16:37 +0000
commit18bbe191cdfe1b1bb64fc0d80ee5113f9cd56e4d (patch)
tree7149dd2bb2d391356fe0002e5ddd9beffb146562 /clang/test/Parser
parent0ddaf2bfb9a8b4ffba4e3ecf093b528ab1929791 (diff)
downloadbcm5719-llvm-18bbe191cdfe1b1bb64fc0d80ee5113f9cd56e4d.tar.gz
bcm5719-llvm-18bbe191cdfe1b1bb64fc0d80ee5113f9cd56e4d.zip
Allow empty assembly string literal with -fno-gnu-inline-asm
Empty assembly string will not introduce assembly code in the output binary and it is often used as a trick in the header to disable optimizations. It doesn't conflict with the purpose of the option so it is allowed with -fno-gnu-inline-asm flag. llvm-svn: 237073
Diffstat (limited to 'clang/test/Parser')
-rw-r--r--clang/test/Parser/no-gnu-inline-asm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Parser/no-gnu-inline-asm.c b/clang/test/Parser/no-gnu-inline-asm.c
index 7089fa4b7df..03c2ede9488 100644
--- a/clang/test/Parser/no-gnu-inline-asm.c
+++ b/clang/test/Parser/no-gnu-inline-asm.c
@@ -5,8 +5,11 @@ 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
+asm(" "); // Whitespace is 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}}
+ asm (""); // Empty is OK
return;
}
OpenPOWER on IntegriCloud