Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-07-05 02:54:52 +0300
committerRui Ueyama <ruiu@google.com>2015-07-05 02:54:52 +0300
commit2b82d5f8ca29dc6e89b65fa92a7792ff3f166f8c (patch)
treeeb9131dcaeda9b779104fbfe32e98676a02402c0 /lld
parent6600eb18cd4934e56f83e726c4ff5f04f123adae (diff)
COFF: Do not warn on identical /merge options.
llvm-svn: 241397
Diffstat (limited to 'lld')
-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 1542256fdefd..875cdd64a877 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();
}