aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/Entity.cpp
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-03-12 09:33:31 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-03-12 09:33:31 +0000
commit2781deb126663ca1bd412044a1e66577585987b3 (patch)
treec03780e898ef3764e93bf865697591f9f06ca5fc /lib/Index/Entity.cpp
parent700030ebddb987936d4fee14d9412821d96e4840 (diff)
Cleanup using StringRef
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/Entity.cpp')
-rw-r--r--lib/Index/Entity.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp
index 03fe9f73af..cd9d277bb6 100644
--- a/lib/Index/Entity.cpp
+++ b/lib/Index/Entity.cpp
@@ -71,9 +71,7 @@ Entity EntityGetter::VisitNamedDecl(NamedDecl *D) {
DeclarationName GlobName;
if (IdentifierInfo *II = LocalName.getAsIdentifierInfo()) {
- IdentifierInfo *GlobII =
- &ProgImpl.getIdents().get(II->getNameStart(),
- II->getNameStart() + II->getLength());
+ IdentifierInfo *GlobII = &ProgImpl.getIdents().get(II->getName());
GlobName = DeclarationName(GlobII);
} else {
Selector LocalSel = LocalName.getObjCSelector();
@@ -140,9 +138,7 @@ Decl *EntityImpl::getDecl(ASTContext &AST) {
DeclarationName LocalName;
if (IdentifierInfo *GlobII = Name.getAsIdentifierInfo()) {
- IdentifierInfo &II =
- AST.Idents.get(GlobII->getNameStart(),
- GlobII->getNameStart() + GlobII->getLength());
+ IdentifierInfo &II = AST.Idents.get(GlobII->getName());
LocalName = DeclarationName(&II);
} else {
Selector GlobSel = Name.getObjCSelector();