diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-11-19 07:49:47 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-11-19 07:49:47 +0000 |
| commit | 82e95a3c79d670c5a702e87741de1659e694d17e (patch) | |
| tree | b13118ae48891173792e2ecf9e876e3cee769b7a /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 70573dcd9f002307584b63033e6e017474e11b0c (diff) | |
Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept.
llvm-svn: 222335
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a6f2d6cfe59b..b35e81c0b2b6 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -245,7 +245,7 @@ static const llvm::GlobalObject *getAliasedGlobal(const llvm::GlobalAlias &GA) { auto *GA2 = dyn_cast<llvm::GlobalAlias>(C); if (!GA2) return nullptr; - if (!Visited.insert(GA2)) + if (!Visited.insert(GA2).second) return nullptr; C = GA2->getAliasee(); } @@ -974,13 +974,13 @@ static void addLinkOptionsPostorder(CodeGenModule &CGM, SmallVectorImpl<llvm::Value *> &Metadata, llvm::SmallPtrSet<Module *, 16> &Visited) { // Import this module's parent. - if (Mod->Parent && Visited.insert(Mod->Parent)) { + if (Mod->Parent && Visited.insert(Mod->Parent).second) { addLinkOptionsPostorder(CGM, Mod->Parent, Metadata, Visited); } // Import this module's dependencies. for (unsigned I = Mod->Imports.size(); I > 0; --I) { - if (Visited.insert(Mod->Imports[I-1])) + if (Visited.insert(Mod->Imports[I - 1]).second) addLinkOptionsPostorder(CGM, Mod->Imports[I-1], Metadata, Visited); } @@ -1021,7 +1021,7 @@ void CodeGenModule::EmitModuleLinkOptions() { for (llvm::SetVector<clang::Module *>::iterator M = ImportedModules.begin(), MEnd = ImportedModules.end(); M != MEnd; ++M) { - if (Visited.insert(*M)) + if (Visited.insert(*M).second) Stack.push_back(*M); } @@ -1041,7 +1041,7 @@ void CodeGenModule::EmitModuleLinkOptions() { if ((*Sub)->IsExplicit) continue; - if (Visited.insert(*Sub)) { + if (Visited.insert(*Sub).second) { Stack.push_back(*Sub); AnyChildren = true; } @@ -1062,7 +1062,7 @@ void CodeGenModule::EmitModuleLinkOptions() { for (llvm::SetVector<clang::Module *>::iterator M = LinkModules.begin(), MEnd = LinkModules.end(); M != MEnd; ++M) { - if (Visited.insert(*M)) + if (Visited.insert(*M).second) addLinkOptionsPostorder(*this, *M, MetadataArgs, Visited); } std::reverse(MetadataArgs.begin(), MetadataArgs.end()); |
