diff options
| author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2010-03-12 09:33:31 +0000 | 
|---|---|---|
| committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2010-03-12 09:33:31 +0000 | 
| commit | 47b55969c3dc720fa8eafa24e6160066e0b133b1 (patch) | |
| tree | 259f03517fa3982a15cf760e348034f81f42a8a2 /clang/lib/Index | |
| parent | 7b88a49f3e422f83443e22fac59e3e7739c6b3d6 (diff) | |
| download | bcm5719-llvm-47b55969c3dc720fa8eafa24e6160066e0b133b1.tar.gz bcm5719-llvm-47b55969c3dc720fa8eafa24e6160066e0b133b1.zip  | |
Cleanup using StringRef
llvm-svn: 98339
Diffstat (limited to 'clang/lib/Index')
| -rw-r--r-- | clang/lib/Index/Entity.cpp | 8 | ||||
| -rw-r--r-- | clang/lib/Index/GlobalSelector.cpp | 8 | 
2 files changed, 4 insertions, 12 deletions
diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp index 03fe9f73af4..cd9d277bb6c 100644 --- a/clang/lib/Index/Entity.cpp +++ b/clang/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(); diff --git a/clang/lib/Index/GlobalSelector.cpp b/clang/lib/Index/GlobalSelector.cpp index 2b2ca6d3b1c..34679185b16 100644 --- a/clang/lib/Index/GlobalSelector.cpp +++ b/clang/lib/Index/GlobalSelector.cpp @@ -29,9 +29,7 @@ Selector GlobalSelector::getSelector(ASTContext &AST) const {    for (unsigned i = 0, e = GlobSel.isUnarySelector() ? 1 : GlobSel.getNumArgs();           i != e; ++i) {      IdentifierInfo *GlobII = GlobSel.getIdentifierInfoForSlot(i); -    IdentifierInfo *II = -      &AST.Idents.get(GlobII->getNameStart(), -                      GlobII->getNameStart() + GlobII->getLength()); +    IdentifierInfo *II = &AST.Idents.get(GlobII->getName());      Ids.push_back(II);    } @@ -58,9 +56,7 @@ GlobalSelector GlobalSelector::get(Selector Sel, Program &Prog) {    for (unsigned i = 0, e = Sel.isUnarySelector() ? 1 : Sel.getNumArgs();           i != e; ++i) {      IdentifierInfo *II = Sel.getIdentifierInfoForSlot(i); -    IdentifierInfo *GlobII = -      &ProgImpl.getIdents().get(II->getNameStart(), -                                II->getNameStart() + II->getLength()); +    IdentifierInfo *GlobII = &ProgImpl.getIdents().get(II->getName());      Ids.push_back(GlobII);    }  | 

