Use map::insert instead of checking existence of a key and insert. NFC.
llvm-svn: 241385
diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp
index 451dcd4..2cd3684 100644
--- a/lld/COFF/DriverUtils.cpp
+++ b/lld/COFF/DriverUtils.cpp
@@ -399,13 +399,14 @@
   std::map<StringRef, Export *> Map;
   std::vector<Export> V;
   for (Export &E : Config->Exports) {
-    auto It = Map.find(E.Name);
-    if (It == Map.end()) {
-      Map.insert(It, std::make_pair(E.Name, &E));
+    auto Pair = Map.insert(std::make_pair(E.Name, &E));
+    bool Inserted = Pair.second;
+    if (Inserted) {
       V.push_back(E);
       continue;
     }
-    if (E == *It->second)
+    Export *Existing = Pair.first->second;
+    if (E == *Existing)
       continue;
     llvm::errs() << "warning: duplicate /export option: " << E.Name << "\n";
     continue;