summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Index')
-rw-r--r--clang/lib/Index/Entity.cpp8
-rw-r--r--clang/lib/Index/GlobalSelector.cpp10
2 files changed, 11 insertions, 7 deletions
diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp
index 77d7a84da4d..03fe9f73af4 100644
--- a/clang/lib/Index/Entity.cpp
+++ b/clang/lib/Index/Entity.cpp
@@ -72,7 +72,8 @@ Entity EntityGetter::VisitNamedDecl(NamedDecl *D) {
if (IdentifierInfo *II = LocalName.getAsIdentifierInfo()) {
IdentifierInfo *GlobII =
- &ProgImpl.getIdents().get(II->getName(), II->getName() + II->getLength());
+ &ProgImpl.getIdents().get(II->getNameStart(),
+ II->getNameStart() + II->getLength());
GlobName = DeclarationName(GlobII);
} else {
Selector LocalSel = LocalName.getObjCSelector();
@@ -139,8 +140,9 @@ Decl *EntityImpl::getDecl(ASTContext &AST) {
DeclarationName LocalName;
if (IdentifierInfo *GlobII = Name.getAsIdentifierInfo()) {
- IdentifierInfo &II = AST.Idents.get(GlobII->getName(),
- GlobII->getName() + GlobII->getLength());
+ IdentifierInfo &II =
+ AST.Idents.get(GlobII->getNameStart(),
+ GlobII->getNameStart() + GlobII->getLength());
LocalName = DeclarationName(&II);
} else {
Selector GlobSel = Name.getObjCSelector();
diff --git a/clang/lib/Index/GlobalSelector.cpp b/clang/lib/Index/GlobalSelector.cpp
index f3ec41d44ff..2b2ca6d3b1c 100644
--- a/clang/lib/Index/GlobalSelector.cpp
+++ b/clang/lib/Index/GlobalSelector.cpp
@@ -29,8 +29,9 @@ 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->getName(),
- GlobII->getName() + GlobII->getLength());
+ IdentifierInfo *II =
+ &AST.Idents.get(GlobII->getNameStart(),
+ GlobII->getNameStart() + GlobII->getLength());
Ids.push_back(II);
}
@@ -57,8 +58,9 @@ 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->getName(),
- II->getName() + II->getLength());
+ IdentifierInfo *GlobII =
+ &ProgImpl.getIdents().get(II->getNameStart(),
+ II->getNameStart() + II->getLength());
Ids.push_back(GlobII);
}
OpenPOWER on IntegriCloud