llvm-project/lld/Common
Fangrui Song 33b38339a0 [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
2022-01-28 11:32:42 -08:00
..
Args.cpp [lld] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
CMakeLists.txt Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
CommonLinkerContext.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
DWARF.cpp
ErrorHandler.cpp [lld] Add module name to LTO inline asm diagnostic 2022-01-28 11:32:42 -08:00
Filesystem.cpp [LLD][ELF][Windows] small improvement to D82567 2020-07-13 12:02:20 +01:00
Memory.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
Reproduce.cpp [lld/mac] Add --reproduce option 2020-11-30 08:40:21 -05:00
Strings.cpp [lld] Add support for other demanglers other than Itanium 2022-01-05 03:25:41 +00:00
TargetOptionsCommandFlags.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
Timer.cpp Add missing include to fix modular build 2022-01-20 08:33:44 -08:00
Version.cpp [lld] Remove unused LLD_REPOSITORY 2021-08-04 13:04:10 -07:00