![]() While GNU as only allows the directory form of the .file directive for DWARF v5, the integrated assembler prefers the directory form on all DWARF versions (-fdwarf-directory-asm). We currently set CC1 -fno-dwarf-directory-asm for -fno-integrated-as -gdwarf-5 which may cause the directory entry 0 and the filename entry 0 to be incorrect (see D105662 and the example below). This patch makes -fno-integrated-as -gdwarf-5 use -fdwarf-directory-asm as well. ``` cd /tmp/c before % clang -g -gdwarf-5 -fno-integrated-as e/a.c -S -o - | grep '\.file.*0' .file 0 "/tmp/c/e/a.c" md5 0x97e31cee64b4e58a4af8787512d735b6 % clang -g -gdwarf-5 -fno-integrated-as e/a.c -c % llvm-dwarfdump a.o | grep include_directories include_directories[ 0] = "/tmp/c/e" after % clang -g -gdwarf-5 -fno-integrated-as e/a.c -S -o - | grep '\.file.*0' .file 0 "/tmp/c" "e/a.c" md5 0x97e31cee64b4e58a4af8787512d735b6 % clang -g -gdwarf-5 -fno-integrated-as e/a.c -c % llvm-dwarfdump a.o | grep include_directories include_directories[ 0] = "/tmp/c" ``` Reviewed By: #debug-info, dblaikie, osandov Differential Revision: https://reviews.llvm.org/D105835 |
||
---|---|---|
.. | ||
ToolChains | ||
Action.cpp | ||
CMakeLists.txt | ||
Compilation.cpp | ||
DarwinSDKInfo.cpp | ||
Distro.cpp | ||
Driver.cpp | ||
DriverOptions.cpp | ||
InputInfo.h | ||
Job.cpp | ||
Multilib.cpp | ||
OptionUtils.cpp | ||
Phases.cpp | ||
SanitizerArgs.cpp | ||
Tool.cpp | ||
ToolChain.cpp | ||
Types.cpp | ||
XRayArgs.cpp |