[llvm-dev] [RFC] better link error messages

Davide Italiano via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 24 17:26:23 PDT 2017


On Fri, Mar 24, 2017 at 4:29 PM, Rui Ueyama via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> On Fri, Mar 24, 2017 at 4:22 PM, Reid Kleckner <rnk at google.com> wrote:
>>
>> I figured you might consider moving the basenames of the filename earlier
>> in the diagnostic, something like:
>>
>> bin/ld.lld: error: duplicate symbol:
>> lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long,
>> lld::elf::RelExpr)
>> >>> defined at Writer.cpp:38 in
>> >>> /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/
>> >>>            Writer.cpp.o in archive lib/liblldELF.a
>> >>> defined at SyntheticSections.cpp:673 in
>> >>> /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/
>> >>>            SyntheticSections.cpp.o in archive lib/liblldELF.a
>>
>> Oftentimes filenames are unique enough that it tells you where to go
>> immediately. Maybe it's a bad idea for the source location info, though. You
>> want that to be copy-pastable or clickable in an IDE.
>
>
> That's an interesting idea, and I think I like it.
>

I really like this one because it also allows to find wrong
debuginfo as an additional bonus.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-dev mailing list