mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-13 20:36:05 +00:00

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
13 lines
423 B
C
13 lines
423 B
C
// 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}}
|
|
return;
|
|
}
|