]> granicus.if.org Git - clang/commitdiff
Update for LLVM API change
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Nov 2014 02:56:13 +0000 (02:56 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 19 Nov 2014 02:56:13 +0000 (02:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222303 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/Utils.h
lib/Basic/VirtualFileSystem.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
lib/Driver/Driver.cpp
lib/Frontend/DependencyFile.cpp

index ce1c9834c5393c4d93dd3bcab7f580b17b16fb4f..4cd93b994fe4c679ba4c83245342499d7a5db936 100644 (file)
@@ -125,7 +125,7 @@ class ModuleDependencyCollector {
 
 public:
   StringRef getDest() { return DestDir; }
-  bool insertSeen(StringRef Filename) { return Seen.insert(Filename); }
+  bool insertSeen(StringRef Filename) { return Seen.insert(Filename).second; }
   void setHasErrors() { HasErrors = true; }
   void addFileMapping(StringRef VPath, StringRef RPath) {
     VFSWriter.addFileMapping(VPath, RPath);
index 8dc7006f2dec032e3da1039a64e793f69743f2ad..617b82e0893fd05073af6b6f63440b648834ccf7 100644 (file)
@@ -296,7 +296,7 @@ class OverlayFSDirIterImpl : public clang::vfs::detail::DirIterImpl {
       }
       CurrentEntry = *CurrentDirIter;
       StringRef Name = llvm::sys::path::filename(CurrentEntry.getName());
-      if (SeenNames.insert(Name))
+      if (SeenNames.insert(Name).second)
         return EC; // name not seen before
     }
     llvm_unreachable("returned above");
index 6da8d8c8a52185a5054657ebaa8b6863993848db..a9d35c32cb7a3de9f23f1a82ed747f4f38c00c42 100644 (file)
@@ -1304,7 +1304,7 @@ llvm::GlobalVariable *MicrosoftCXXABI::getAddrOfVTable(const CXXRecordDecl *RD,
     for (size_t J = 0, F = VFPtrs.size(); J != F; ++J) {
       SmallString<256> Name;
       mangleVFTableName(getMangleContext(), RD, VFPtrs[J], Name);
-      if (!ObservedMangledNames.insert(Name.str()))
+      if (!ObservedMangledNames.insert(Name.str()).second)
         llvm_unreachable("Already saw this mangling before?");
     }
 #endif
index 5d25ed77b9826ba1e6b2b7bf5db9e8cb9db89e3a..d459e4be1225386767d6b6d56c182fb633205a01 100644 (file)
@@ -884,7 +884,7 @@ void Driver::BuildUniversalActions(const ToolChain &TC,
       }
 
       A->claim();
-      if (ArchNames.insert(A->getValue()))
+      if (ArchNames.insert(A->getValue()).second)
         Archs.push_back(A->getValue());
     }
   }
index 08d66c7094348aeaf282e4b258c6a841e1bdb03b..6ea8f5193ef78852fc057721ca858b0c0fb385ee 100644 (file)
@@ -109,7 +109,7 @@ struct DepCollectorASTListener : public ASTReaderListener {
 void DependencyCollector::maybeAddDependency(StringRef Filename, bool FromModule,
                                             bool IsSystem, bool IsModuleFile,
                                             bool IsMissing) {
-  if (Seen.insert(Filename) &&
+  if (Seen.insert(Filename).second &&
       sawDependency(Filename, FromModule, IsSystem, IsModuleFile, IsMissing))
     Dependencies.push_back(Filename);
 }
@@ -285,7 +285,7 @@ void DFGImpl::InclusionDirective(SourceLocation HashLoc,
 }
 
 void DFGImpl::AddFilename(StringRef Filename) {
-  if (FilesSet.insert(Filename))
+  if (FilesSet.insert(Filename).second)
     Files.push_back(Filename);
 }