[llvm] [llvm][dwarfdump] Print the name (if available) of entities referenced by DW_AT_import (PR #171859)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 08:57:15 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 128568 tests passed
* 2805 tests skipped
* 4 tests failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.DebugInfo/Generic/import-inlined-declaration.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llc.exe  -mtriple=x86_64-pc-windows-gnu -O0 -filetype=obj < C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\import-inlined-declaration.ll | c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --implicit-check-not "{{DW_TAG|NULL}}" C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\import-inlined-declaration.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64-pc-windows-gnu -O0 -filetype=obj
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe' -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --implicit-check-not '{{DW_TAG|NULL}}' 'C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\import-inlined-declaration.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\import-inlined-declaration.ll:33:10: error: CHECK: expected string not found in input
# | ; CHECK: DW_AT_import ([[FOO]])
# |          ^
# | <stdin>:64:40: note: scanning from here
# | 0x00000081: DW_TAG_imported_declaration
# |                                        ^
# | <stdin>:64:40: note: with "FOO" equal to "0x0000002b"
# | 0x00000081: DW_TAG_imported_declaration
# |                                        ^
# | <stdin>:67:2: note: possible intended match here
# |  DW_AT_import (0x0000002b "_ZN2ns3fooEv")
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\import-inlined-declaration.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            59:  DW_AT_location (DW_OP_fbreg +4) 
# |            60:  DW_AT_abstract_origin (0x00000037 "a") 
# |            61:  
# |            62: 0x00000080: NULL 
# |            63:  
# |            64: 0x00000081: DW_TAG_imported_declaration 
# | check:33'0                                            X error: no match found
# | check:33'1                                              with "FOO" equal to "0x0000002b"
# |            65:  DW_AT_decl_file ("imported-inlined-declaration.cpp") 
# | check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            66:  DW_AT_decl_line (7) 
# | check:33'0     ~~~~~~~~~~~~~~~~~~~~~
# |            67:  DW_AT_import (0x0000002b "_ZN2ns3fooEv") 
# | check:33'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:33'2      ?                                         possible intended match
# |            68:  
# | check:33'0     ~
# |            69: 0x00000088: NULL 
# | check:33'0     ~~~~~~~~~~~~~~~~~
# |            70:  
# | check:33'0     ~
# |            71: 0x00000089: NULL 
# | check:33'0     ~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.DebugInfo/Generic/namespace.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\llc.exe  -mtriple=x86_64-pc-windows-gnu -O0 -filetype=obj -dwarf-linkage-names=All < C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\namespace.ll | c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\namespace.ll --implicit-check-not "{{DW_TAG|NULL}}"
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64-pc-windows-gnu -O0 -filetype=obj -dwarf-linkage-names=All
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe' -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\namespace.ll' --implicit-check-not '{{DW_TAG|NULL}}'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\namespace.ll:55:10: error: CHECK: expected string not found in input
# | ; CHECK: DW_AT_import ([[NS2]])
# |          ^
# | <stdin>:122:22: note: scanning from here
# |  DW_AT_decl_line (15)
# |                      ^
# | <stdin>:122:22: note: with "NS2" equal to "0x00000030"
# |  DW_AT_decl_line (15)
# |                      ^
# | <stdin>:123:2: note: possible intended match here
# |  DW_AT_import (0x00000030 "B")
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\Generic\namespace.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           117:  
# |           118: 0x0000010a: NULL 
# |           119:  
# |           120: 0x0000010b: DW_TAG_imported_module 
# |           121:  DW_AT_decl_file ("/tmp\foo.cpp") 
# |           122:  DW_AT_decl_line (15) 
# | check:55'0                          X error: no match found
# | check:55'1                            with "NS2" equal to "0x00000030"
# |           123:  DW_AT_import (0x00000030 "B") 
# | check:55'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:55'2      ?                              possible intended match
# |           124:  
# | check:55'0     ~
# |           125: 0x00000112: DW_TAG_imported_declaration 
# | check:55'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           126:  DW_AT_decl_file ("/tmp\foo.cpp") 
# | check:55'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           127:  DW_AT_decl_line (42) 
# | check:55'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           128:  DW_AT_import (0x00000035 "_ZN1A1B1iE") 
# | check:55'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.DebugInfo/X86/dimodule-external-fortran.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 23
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -filetype=obj  C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\X86\dimodule-external-fortran.ll -o - | c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\X86\dimodule-external-fortran.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -filetype=obj 'C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\X86\dimodule-external-fortran.ll' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe' -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\X86\dimodule-external-fortran.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\X86\dimodule-external-fortran.ll:32:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: DW_AT_import ([[DIE_ID]])
# |               ^
# | <stdin>:47:17: note: scanning from here
# |  DW_AT_decl_line (2)
# |                 ^
# | <stdin>:47:17: note: with "DIE_ID" equal to "0x0000006a"
# |  DW_AT_decl_line (2)
# |                 ^
# | <stdin>:48:2: note: possible intended match here
# |  DW_AT_import (0x0000006a "external_module")
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\DebugInfo\X86\dimodule-external-fortran.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           42:  DW_AT_name ("external_module") 
# |           43:  DW_AT_declaration (true) 
# |           44:  
# |           45: 0x0000006f: DW_TAG_imported_module 
# |           46:  DW_AT_decl_file ("tests\em.f90") 
# |           47:  DW_AT_decl_line (2) 
# | next:32'0                     X~~~~ error: no match found
# | next:32'1                           with "DIE_ID" equal to "0x0000006a"
# |           48:  DW_AT_import (0x0000006a "external_module") 
# | next:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:32'2      ?                                            possible intended match
# |           49:  
# | next:32'0     ~
# |           50: 0x00000076: NULL 
# | next:32'0     ~~~~~~~~~~~~~~~~~
# |           51:  
# | next:32'0     ~
# |           52: 0x00000077: DW_TAG_base_type 
# | next:32'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           53:  DW_AT_name ("REAL*4") 
# | next:32'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |            .
# |            .
# |            .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.tools/dsymutil/X86/modules-empty.m</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 13
rm -rf C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir
# executed command: rm -rf 'C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir'
# note: command had no output on stdout or stderr
# RUN: at line 14
mkdir C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir
# executed command: mkdir 'C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir'
# note: command had no output on stdout or stderr
# RUN: at line 15
cp C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86/../Inputs/modules-empty/1.o C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86/../Inputs/modules-empty/Empty.pcm  C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir
# executed command: cp 'C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86/../Inputs/modules-empty/1.o' 'C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86/../Inputs/modules-empty/Empty.pcm' 'C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir'
# note: command had no output on stdout or stderr
# RUN: at line 17
c:\_work\llvm-project\llvm-project\build\bin\dsymutil.exe -f -oso-prepend-path=C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir    -verify    -y C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86/dummy-debug-map.map -o -      | c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe --debug-info - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86\modules-empty.m
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\dsymutil.exe' -f '-oso-prepend-path=C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir' -verify -y 'C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86/dummy-debug-map.map' -o -
# .---command stderr------------
# | warning: Unable to open C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\2.o no such file or directory
# | warning: Unable to open C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\3.o no such file or directory
# | warning: Unable to open C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\4.o no such file or directory
# | warning: C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\2.o: no such file or directory
# | note: while processing C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\2.o
# | warning: C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\3.o: no such file or directory
# | note: while processing C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\3.o
# | warning: C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\4.o: no such file or directory
# | note: while processing C:\_work\llvm-project\llvm-project\build\test\tools\dsymutil\X86\Output\modules-empty.m.tmp.dir\4.o
# | warning: couldn`t find compile unit for the macro table with offset = 0x0
# | note: while processing 
# | warning: verification skipped for x86_64 because writing to stdout.
# `-----------------------------
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-dwarfdump.exe' --debug-info -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86\modules-empty.m'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86\modules-empty.m:34:15: error: CHECK-NOT: excluded string found in input
# | // CHECK-NOT: "Empty"
# |               ^
# | <stdin>:24:35: note: found here
# |  DW_AT_import (0x000000000000002b "Empty")
# |                                   ^~~~~~~
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\tools\dsymutil\X86\modules-empty.m
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |         .
# |         .
# |         .
# |        19:  DW_AT_LLVM_sysroot ("/") 
# |        20:  
# |        21: 0x00000038: DW_TAG_imported_declaration 
# |        22:  DW_AT_decl_file ("/modules-unused.m") 
# |        23:  DW_AT_decl_line (21) 
# |        24:  DW_AT_import (0x000000000000002b "Empty") 
# | not:34                                       !~~~~~~   error: no match expected
# |        25:  
# |        26: 0x0000003f: DW_TAG_subprogram 
# |        27:  DW_AT_low_pc (0x0000000000010000) 
# |        28:  DW_AT_high_pc (0x000000000001000f) 
# |        29:  DW_AT_frame_base (DW_OP_reg6 RBP) 
# |         .
# |         .
# |         .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/171859


More information about the llvm-commits mailing list