diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-25 06:18:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-25 06:18:57 +0000 |
commit | eb99810502e85b357869ef7af013b8d30f85b0ef (patch) | |
tree | 670289a44ccd753426ce53d47d0c36fb697dcb57 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c61d0e9ee9eaa21b56eca4499781b22da05ed873 (diff) | |
download | bcm5719-llvm-eb99810502e85b357869ef7af013b8d30f85b0ef.tar.gz bcm5719-llvm-eb99810502e85b357869ef7af013b8d30f85b0ef.zip |
Use DenseMap on IdentifierInfo instead of StringMap.
llvm-svn: 55303
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index bea92ce7d32..51428c07ac8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -250,7 +250,7 @@ void CodeGenModule::EmitStatics() { // Check if we have used a decl with the same name // FIXME: The AST should have some sort of aggregate decls or // global symbol map. - if (!GlobalDeclMap.count(D->getName())) + if (!GlobalDeclMap.count(D->getIdentifier())) continue; // Emit the definition. @@ -362,7 +362,7 @@ void CodeGenModule::EmitGlobalDefinition(const ValueDecl *D) { const llvm::Type *PTy = llvm::PointerType::get(Ty, ASTTy.getAddressSpace()); // Lookup the entry, lazily creating it if necessary. - llvm::GlobalValue *&Entry = GlobalDeclMap[D->getName()]; + llvm::GlobalValue *&Entry = GlobalDeclMap[D->getIdentifier()]; if (!Entry) Entry = new llvm::GlobalVariable(Ty, false, llvm::GlobalValue::ExternalLinkage, @@ -396,7 +396,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { } const llvm::Type* InitType = Init->getType(); - llvm::GlobalValue *&Entry = GlobalDeclMap[D->getName()]; + llvm::GlobalValue *&Entry = GlobalDeclMap[D->getIdentifier()]; llvm::GlobalVariable *GV = cast_or_null<llvm::GlobalVariable>(Entry); if (!GV) { @@ -542,7 +542,7 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(const FunctionDecl *D) { const llvm::Type *PTy = llvm::PointerType::get(Ty, ASTTy.getAddressSpace()); // Lookup the entry, lazily creating it if necessary. - llvm::GlobalValue *&Entry = GlobalDeclMap[D->getName()]; + llvm::GlobalValue *&Entry = GlobalDeclMap[D->getIdentifier()]; if (!Entry) Entry = EmitForwardFunctionDefinition(D); @@ -550,7 +550,7 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(const FunctionDecl *D) { } void CodeGenModule::EmitGlobalFunctionDefinition(const FunctionDecl *D) { - llvm::GlobalValue *&Entry = GlobalDeclMap[D->getName()]; + llvm::GlobalValue *&Entry = GlobalDeclMap[D->getIdentifier()]; if (!Entry) { Entry = EmitForwardFunctionDefinition(D); } else { |