aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-07-12 15:46:20 -0700
committerFangrui Song <i@maskray.me>2021-07-12 15:46:20 -0700
commit51fc742ce716a09359f4f87ffe3876cb7ff9479d (patch)
tree50407a7d67c648ef75b47b96b9ef73bf6c877287 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentf2832c2295c6076b51a35d0d7b304c08e1b41c29 (diff)
downloadllvm-51fc742ce716a09359f4f87ffe3876cb7ff9479d.zip
llvm-51fc742ce716a09359f4f87ffe3876cb7ff9479d.tar.gz
llvm-51fc742ce716a09359f4f87ffe3876cb7ff9479d.tar.bz2
[Driver] Let -fno-integrated-as -gdwarf-5 use -fdwarf-directory-asm
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
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions