aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Entity.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:40:21 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-29 23:40:21 +0000
commitdc1792c78ac40a05c3ab00d4da5574ba03f19769 (patch)
treefd1f552cf9c6590a559ebc57a66c86cc2711611f /lib/Index/Entity.cpp
parent7f4656eb6b60a7f3596fb26b9d5aed3731b3109e (diff)
Use an IdentifierTable for names used for Entities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77537 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/Entity.cpp')
-rw-r--r--lib/Index/Entity.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index d33110074f..8c7c8d0ef5 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -70,9 +70,8 @@ Entity EntityGetter::VisitNamedDecl(NamedDecl *D) {
if (!II)
return Entity();
- EntityImpl::IdEntryTy *Id =
- &Prog.getIdents().GetOrCreateValue(II->getName(),
- II->getName() + II->getLength());
+ IdentifierInfo *Id = &Prog.getIdents().get(II->getName(),
+ II->getName() + II->getLength());
unsigned IdNS = D->getIdentifierNamespace();
llvm::FoldingSetNodeID ID;
@@ -117,7 +116,8 @@ Decl *EntityImpl::getDecl(ASTContext &AST) {
if (!DC)
return 0; // Couldn't get the parent context.
- IdentifierInfo &II = AST.Idents.get(Id->getKeyData());
+ IdentifierInfo &II = AST.Idents.get(Id->getName(),
+ Id->getName() + Id->getLength());
DeclContext::lookup_result Res = DC->lookup(DeclarationName(&II));
for (DeclContext::lookup_iterator I = Res.first, E = Res.second; I!=E; ++I) {
@@ -136,7 +136,7 @@ Entity EntityImpl::get(Decl *D, ProgramImpl &Prog) {
}
std::string EntityImpl::getPrintableName() {
- return std::string(Id->getKeyData(), Id->getKeyData() + Id->getKeyLength());
+ return Id->getName();
}
//===----------------------------------------------------------------------===//