aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/RewriteObjC.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-07-25 16:49:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-07-25 16:49:02 +0000
commit402785357ab053dd53f4fdd858b9630a5e0f8bad (patch)
tree68d445a935324fbe002d22e1d18790497d275ba3 /lib/Rewrite/RewriteObjC.cpp
parent1cbac8ac446cf513dbc7486dd50abd55bcfc62c6 (diff)
Mechanically rename SourceManager::getInstantiationLoc and
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r--lib/Rewrite/RewriteObjC.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp
index 524d78e9ce..64e5309c4b 100644
--- a/lib/Rewrite/RewriteObjC.cpp
+++ b/lib/Rewrite/RewriteObjC.cpp
@@ -690,7 +690,7 @@ void RewriteObjC::HandleTopLevelSingleDecl(Decl *D) {
// #included file. If the former, rewrite it now. If the later, check to see
// if we rewrote the #include/#import.
SourceLocation Loc = D->getLocation();
- Loc = SM->getInstantiationLoc(Loc);
+ Loc = SM->getExpansionLoc(Loc);
// If this is for a builtin, ignore it.
if (Loc.isInvalid()) return;
@@ -2342,13 +2342,13 @@ void RewriteObjC::RewriteTypeOfDecl(VarDecl *ND) {
startLoc = ECE->getLParenLoc();
else
startLoc = E->getLocStart();
- startLoc = SM->getInstantiationLoc(startLoc);
+ startLoc = SM->getExpansionLoc(startLoc);
const char *endBuf = SM->getCharacterData(startLoc);
ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
}
else {
SourceLocation X = ND->getLocEnd();
- X = SM->getInstantiationLoc(X);
+ X = SM->getExpansionLoc(X);
const char *endBuf = SM->getCharacterData(X);
ReplaceText(DeclLoc, endBuf-startBuf-1, TypeAsString);
}
@@ -5108,7 +5108,7 @@ void RewriteObjC::RewriteByRefVar(VarDecl *ND) {
DeclLoc = ND->getLocation();
const char *startBuf = SM->getCharacterData(DeclLoc);
SourceLocation X = ND->getLocEnd();
- X = SM->getInstantiationLoc(X);
+ X = SM->getExpansionLoc(X);
const char *endBuf = SM->getCharacterData(X);
std::string Name(ND->getNameAsString());
std::string ByrefType;
@@ -5203,7 +5203,7 @@ void RewriteObjC::RewriteByRefVar(VarDecl *ND) {
startLoc = ECE->getLParenLoc();
else
startLoc = E->getLocStart();
- startLoc = SM->getInstantiationLoc(startLoc);
+ startLoc = SM->getExpansionLoc(startLoc);
endBuf = SM->getCharacterData(startLoc);
ByrefType += " " + Name;
ByrefType += " = {(void*)";