diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-13 01:28:18 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-04-13 01:28:18 +0000 |
commit | 84083b74abc4a2d1a9013ce4c75d63ee7d6d1da3 (patch) | |
tree | 88b711c4cd324605e37200712ab5e263113f9e49 /lib/CodeGen/CodeGenModule.cpp | |
parent | 175c8e2e57befe2db15dd339ab5eb27d0c2b6013 (diff) |
Use MapVector rather than simulating it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 4126bea295..aacabc7867 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1748,8 +1748,6 @@ void CodeGenModule::MaybeHandleStaticInExternC(const SomeDecl *D, // in extern "C" regions, none of them gets that name. if (!R.second) R.first->second = 0; - else - StaticExternCIdents.push_back(D->getIdentifier()); } void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { @@ -2958,9 +2956,11 @@ static void EmitGlobalDeclMetadata(CodeGenModule &CGM, /// to such functions with an unmangled name from inline assembly within the /// same translation unit. void CodeGenModule::EmitStaticExternCAliases() { - for (unsigned I = 0, N = StaticExternCIdents.size(); I != N; ++I) { - IdentifierInfo *Name = StaticExternCIdents[I]; - llvm::GlobalValue *Val = StaticExternCValues[Name]; + for (StaticExternCMap::iterator I = StaticExternCValues.begin(), + E = StaticExternCValues.end(); + I != E; ++I) { + IdentifierInfo *Name = I->first; + llvm::GlobalValue *Val = I->second; if (Val && !getModule().getNamedValue(Name->getName())) AddUsedGlobal(new llvm::GlobalAlias(Val->getType(), Val->getLinkage(), Name->getName(), Val, &getModule())); |