[Lldb-commits] [lldb] [NFCI][lldb][test] Avoid unnecessary GNU extension for assembly call (PR #166769)

Raul Tambre via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 6 05:11:54 PST 2025


https://github.com/tambry created https://github.com/llvm/llvm-project/pull/166769

`asm()` on function declarations is used for specifying the mangling. But it's a GNU extension and very much unnecessary here since the name matches.

Fixes compiling if the compiler defaults to non-extensions mode.

>From 6f1844d202393b0c9276325e90cdc700fb3ab4c6 Mon Sep 17 00:00:00 2001
From: Raul Tambre <raul at tambre.ee>
Date: Thu, 6 Nov 2025 14:45:27 +0200
Subject: [PATCH] [NFCI][lldb][test] Avoid unnecessary GNU extension for
 assembly call

`asm()` on function declarations is used for specifying the mangling. But it's a GNU extension and
very much unnecessary here since the name matches.

Fixes compiling if the compiler defaults to non-extensions mode.
---
 lldb/test/Shell/Unwind/Inputs/call-asm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lldb/test/Shell/Unwind/Inputs/call-asm.c b/lldb/test/Shell/Unwind/Inputs/call-asm.c
index b154c1ac1385d..30d0069504172 100644
--- a/lldb/test/Shell/Unwind/Inputs/call-asm.c
+++ b/lldb/test/Shell/Unwind/Inputs/call-asm.c
@@ -1,3 +1,2 @@
-int asm_main() asm("asm_main");
-
+int asm_main();
 int main() { return asm_main(); }



More information about the lldb-commits mailing list