[lld] r359749 - lld-link: Make "duplicate resource" error message a bit more concise
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed May 1 18:52:24 PDT 2019
Author: nico
Date: Wed May 1 18:52:24 2019
New Revision: 359749
URL: http://llvm.org/viewvc/llvm-project?rev=359749&view=rev
Log:
lld-link: Make "duplicate resource" error message a bit more concise
Reduces the error message from:
lld-link: error: failed to parse .res file: duplicate resource: type STRINGTABLE (ID 6)/name ID 3/language 1033, in test1.res and in test2.res
To:
lld-link: error: duplicate resource: type STRINGTABLE (ID 6)/name ID 3/language 1033, in test1.res and in test2.res
Make sure every error message emitted by cvtres contains the name of at
least one ".res" file, so that removing the "failed to parse .res file"
string doesn't lose information.
Differential Revision: https://reviews.llvm.org/D61388
Modified:
lld/trunk/COFF/DriverUtils.cpp
Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=359749&r1=359748&r2=359749&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Wed May 1 18:52:24 2019
@@ -746,7 +746,7 @@ MemoryBufferRef convertResToCOFF(ArrayRe
if (!RF)
fatal("cannot compile non-resource file as resource");
if (auto EC = Parser.parse(RF))
- fatal("failed to parse .res file: " + toString(std::move(EC)));
+ fatal(toString(std::move(EC)));
}
Expected<std::unique_ptr<MemoryBuffer>> E =
More information about the llvm-commits
mailing list