[lld] r241397 - COFF: Do not warn on identical /merge options.
Rui Ueyama
ruiu at google.com
Sat Jul 4 16:54:52 PDT 2015
Author: ruiu
Date: Sat Jul 4 18:54:52 2015
New Revision: 241397
URL: http://llvm.org/viewvc/llvm-project?rev=241397&view=rev
Log:
COFF: Do not warn on identical /merge options.
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=241397&r1=241396&r2=241397&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Sat Jul 4 18:54:52 2015
@@ -183,9 +183,12 @@ std::error_code parseMerge(StringRef S)
}
auto Pair = Config->Merge.insert(std::make_pair(From, To));
bool Inserted = Pair.second;
- if (!Inserted)
- llvm::errs() << "warning: " << S << ": already merged into "
- << Pair.first->second << "\n";
+ if (!Inserted) {
+ StringRef Existing = Pair.first->second;
+ if (Existing != To)
+ llvm::errs() << "warning: " << S << ": already merged into "
+ << Existing << "\n";
+ }
return std::error_code();
}
More information about the llvm-commits
mailing list