summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-07-04 23:54:52 +0000
committerRui Ueyama <ruiu@google.com>2015-07-04 23:54:52 +0000
commit2b82d5f8ca29dc6e89b65fa92a7792ff3f166f8c (patch)
treeeb9131dcaeda9b779104fbfe32e98676a02402c0
parent6600eb18cd4934e56f83e726c4ff5f04f123adae (diff)
downloadbcm5719-llvm-2b82d5f8ca29dc6e89b65fa92a7792ff3f166f8c.tar.gz
bcm5719-llvm-2b82d5f8ca29dc6e89b65fa92a7792ff3f166f8c.zip
COFF: Do not warn on identical /merge options.
llvm-svn: 241397
-rw-r--r--lld/COFF/DriverUtils.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp
index 1542256fdef..875cdd64a87 100644
--- a/lld/COFF/DriverUtils.cpp
+++ b/lld/COFF/DriverUtils.cpp
@@ -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();
}
OpenPOWER on IntegriCloud