[PATCH] D118434: [lld] Add module name to LTO inline asm diagnostic
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 22:52:29 PST 2022
MaskRay created this revision.
MaskRay added reviewers: lld-macho, thakis, ychen.
Herald added subscribers: ormris, dexonsmith, steven_wu, hiraditya, inglorion, emaste.
Herald added a project: lld-macho.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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 following 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118434
Files:
lld/Common/ErrorHandler.cpp
lld/test/ELF/lto/inline-asm-err.ll
lld/test/MachO/lto-module-asm-err.s
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/lib/CodeGen/MachineModuleInfo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118434.403895.patch
Type: text/x-patch
Size: 4604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220128/bbd5728c/attachment.bin>
More information about the llvm-commits
mailing list