summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-13 01:28:18 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-13 01:28:18 +0000
commitf21c9617f83ebc6e8955984b7c4ba6e60e72b566 (patch)
tree9587a4623698964f139c04bec12cbb71317410b5 /clang/lib/CodeGen/CodeGenModule.cpp
parent389823e99594aa3a06f5b6218d07252f7ce0d567 (diff)
downloadbcm5719-llvm-f21c9617f83ebc6e8955984b7c4ba6e60e72b566.tar.gz
bcm5719-llvm-f21c9617f83ebc6e8955984b7c4ba6e60e72b566.zip
Use MapVector rather than simulating it.
llvm-svn: 179438
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 4126bea295b..aacabc78679 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/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()));
OpenPOWER on IntegriCloud