[PATCH] D58910: [LLD][COFF] More detailed information for /failifmismatch

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 06:10:28 PDT 2019


aganea marked an inline comment as done.
aganea added inline comments.


================
Comment at: lld/trunk/COFF/DriverUtils.cpp:701
 // if value matches previous values for the same key.
-void checkFailIfMismatch(StringRef Arg) {
+void checkFailIfMismatch(StringRef Arg, StringRef Source) {
   StringRef K, V;
----------------
ruiu wrote:
> In general, an error string that may be composed should be of type `const Twine &` instead of `StringRef` to avoid cost of string concatenation.
The `Twine` would need to be flattened anyway below, because it has to be stored as a value in `Config->MustMatch`.
As an alternative, I can pass a `InputFile *Source` instead as a parameter. Would you prefer that? Please see D59411.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58910/new/

https://reviews.llvm.org/D58910





More information about the llvm-commits mailing list