-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[NFCI][lldb][test] Avoid GNU extension for specifying mangling #167221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
`asm()` on function declarations is used for specifying the mangling. But that specific spelling is a GNU extension unlike `__asm()`. Found by building with `-std=c2y` in Clang's C frontend's config file.
|
@llvm/pr-subscribers-lldb Author: Raul Tambre (tambry) Changes
Found by building with Full diff: https://github.com/llvm/llvm-project/pull/167221.diff 1 Files Affected:
diff --git a/lldb/test/Shell/Unwind/Inputs/call-asm.c b/lldb/test/Shell/Unwind/Inputs/call-asm.c
index b154c1ac1385d..778c16b36a761 100644
--- a/lldb/test/Shell/Unwind/Inputs/call-asm.c
+++ b/lldb/test/Shell/Unwind/Inputs/call-asm.c
@@ -1,3 +1,3 @@
-int asm_main() asm("asm_main");
-
+// Explicit mangling is necessary as on Darwin an underscore is prepended to the symbol.
+int asm_main() __asm("asm_main");
int main() { return asm_main(); }
|
0b1ddaf to
20ed954
Compare
|
What's the specific error/warning you're getting? This seems like a perfectly supported Clang attribute: https://clang.llvm.org/docs/AttributeReference.html#asm and the spelling you're changing it to is not listed in "Supported Syntaxes". |
|
@Michael137 The error: The |
asm()on function declarations is used for specifying the mangling. But that specific spelling is a GNU extension unlike__asm().Found by building with
-std=c2yin Clang's C frontend's config file.