[llvm] [llvm-objdump] Add inlined function display support (PR #142246)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 07:14:05 PDT 2025
================
@@ -1,84 +1,104 @@
-## Generated with this compile command, with the source code in Inputs/debug-inlined-functions.c:
-## clang -g -c debug-inlined-function.c -O1 -S -o -
+## Generated with this compile command, with the source code in Inputs/debug-inlined-functions.cc:
+## clang++ -g -c debug-inlined-functions.cc -O1 -S -o -
# RUN: llvm-mc -triple=x86_64 %s -filetype=obj -o %t.o
-# RUN: llvm-objdump %t.o -d --debug-inlined-funcs=line | \
+# RUN: llvm-objdump %t.o -d -C --debug-inlined-funcs=limits-only | \
# RUN: FileCheck %s --check-prefix=LINE
-# RUN: llvm-objdump %t.o -d --debug-inlined-funcs=unicode | \
+# RUN: llvm-objdump %t.o -d -C --debug-inlined-funcs | \
+# RUN: FileCheck %s --check-prefix=UNICODE --strict-whitespace
+
+# RUN: llvm-objdump %t.o -d -C --debug-inlined-funcs=unicode | \
# RUN: FileCheck %s --check-prefix=UNICODE --strict-whitespace
-# RUN: llvm-objdump %t.o -d --debug-inlined-funcs=unicode --debug-indent=30 | \
+# RUN: llvm-objdump %t.o -d --debug-inlined-funcs=unicode | \
+# RUN: FileCheck %s --check-prefix=MANGLE --strict-whitespace
+
+# RUN: llvm-objdump %t.o -d -C --debug-inlined-funcs=unicode --debug-indent=30 | \
# RUN: FileCheck %s --check-prefix=INDENT --strict-whitespace
-# RUN: llvm-objdump %t.o -d --debug-inlined-funcs=ascii | \
+# RUN: llvm-objdump %t.o -d -C --debug-inlined-funcs=ascii | \
# RUN: FileCheck %s --check-prefix=ASCII --strict-whitespace
-# RUN: llvm-objdump %t.o -d --debug-inlined-funcs=unicode --debug-vars=unicode | \
+# RUN: llvm-objdump %t.o -d -C --debug-inlined-funcs=unicode --debug-vars=unicode | \
# RUN: FileCheck %s --check-prefix=DEBUG-ALL --strict-whitespace
-# LINE: 0000000000000000 <bar>:
+# LINE: 0000000000000000 <bar(int, int)>:
# LINE-NEXT: 0: 8d 04 3e leal (%rsi,%rdi), %eax
# LINE-NEXT: 3: 0f af f7 imull %edi, %esi
# LINE-NEXT: 6: 01 f0 addl %esi, %eax
# LINE-NEXT: 8: c3 retq
# LINE-NEXT: 9: 0f 1f 80 00 00 00 00 nopl (%rax)
# LINE-EMPTY:
-# LINE-NEXT: 0000000000000010 <foo>:
-# LINE-NEXT: debug-inlined-functions.c:8:16: bar inlined into foo
+# LINE-NEXT: 0000000000000010 <foo(int, int)>:
+# LINE-NEXT: debug-inlined-functions.cc:8:16: bar(int, int) inlined into foo(int, int)
# LINE-NEXT: 10: 8d 04 3e leal (%rsi,%rdi), %eax
# LINE-NEXT: 13: 0f af f7 imull %edi, %esi
# LINE-NEXT: 16: 01 f0 addl %esi, %eax
-# LINE-NEXT: debug-inlined-functions.c:8:16: end of bar inlined into foo
+# LINE-NEXT: debug-inlined-functions.cc:8:16: end of bar(int, int) inlined into foo(int, int)
# LINE-NEXT: 18: c3 retq
-# UNICODE: 0000000000000000 <bar>:
+# UNICODE: 0000000000000000 <bar(int, int)>:
# UNICODE-NEXT: 0: 8d 04 3e leal (%rsi,%rdi), %eax
# UNICODE-NEXT: 3: 0f af f7 imull %edi, %esi
# UNICODE-NEXT: 6: 01 f0 addl %esi, %eax
# UNICODE-NEXT: 8: c3 retq
# UNICODE-NEXT: 9: 0f 1f 80 00 00 00 00 nopl (%rax)
# UNICODE-EMPTY:
-# UNICODE-NEXT: 0000000000000010 <foo>:
-# UNICODE-NEXT: ┠─ bar = inlined into foo
-# UNICODE-NEXT: 10: 8d 04 3e leal (%rsi,%rdi), %eax ┃
-# UNICODE-NEXT: 13: 0f af f7 imull %edi, %esi ┃
-# UNICODE-NEXT: 16: 01 f0 addl %esi, %eax ┻
-# UNICODE-NEXT: 18: c3 retq
+# UNICODE-NEXT: 0000000000000010 <foo(int, int)>:
+# UNICODE-NEXT: ┠─ bar(int, int) = inlined into foo(int, int)
+# UNICODE-NEXT: 10: 8d 04 3e leal (%rsi,%rdi), %eax ┃
+# UNICODE-NEXT: 13: 0f af f7 imull %edi, %esi ┃
+# UNICODE-NEXT: 16: 01 f0 addl %esi, %eax ┻
+# UNICODE-NEXT: 18: c3 retq
+
+# MANGLE: 0000000000000000 <_Z3barii>:
----------------
gulfemsavrun wrote:
I simplified the test, and tried to reuse common parts.
https://github.com/llvm/llvm-project/pull/142246
More information about the llvm-commits
mailing list