diff options
author | Fangrui Song <i@maskray.me> | 2022-01-28 11:32:42 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-01-28 11:32:42 -0800 |
commit | 33b38339a0961c04ce32a6656aa54293d5ca4790 (patch) | |
tree | cd4b6dd4207541ae28b8a88cd5bb606c16eb50fb /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 4abfe47e1fc8b4c7583d5bdcb20d102dd2a5efb1 (diff) | |
download | llvm-33b38339a0961c04ce32a6656aa54293d5ca4790.zip llvm-33b38339a0961c04ce32a6656aa54293d5ca4790.tar.gz llvm-33b38339a0961c04ce32a6656aa54293d5ca4790.tar.bz2 |
[lld] Add module name to LTO inline asm diagnostic
Close #52781: for LTO, the inline asm diagnostic uses `<inline asm>` as the file
name (lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp) and it is unclear which
module has the issue.
With this patch, we will see the module name (say `asm.o`) before `<inline asm>` with ThinLTO.
```
% clang -flto=thin -c asm.c && myld.lld asm.o -e f
ld.lld: error: asm.o <inline asm>:1:2: invalid instruction mnemonic 'invalid'
invalid
^~~~~~~
```
For regular LTO, unfortunately the original module name is lost and we only get
ld-temp.o.
Reviewed By: #lld-macho, ychen, Jez Ng
Differential Revision: https://reviews.llvm.org/D118434
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions