summaryrefslogtreecommitdiffstats
path: root/lib/Lex/TokenLexer.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-07-26 03:03:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-07-26 03:03:05 +0000
commitbf340e452339e374ea6eef78c1f0a2abdd16c5a3 (patch)
tree8c1f55248e74ac8a70ebc51ef84cde8bd51e20f9 /lib/Lex/TokenLexer.cpp
parent96d3589e523a04f4ff2058a7919226ce60696ae8 (diff)
Rename create(MacroArg)InstantiationLoc to create(MacroArg)ExpansionLoc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r--lib/Lex/TokenLexer.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 22f94e097e..985b2a068e 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -57,10 +57,10 @@ void TokenLexer::Init(Token &Tok, SourceLocation ELEnd, MacroArgs *Actuals) {
// creating separate source location entries for each token.
SourceLocation macroStart = SM.getExpansionLoc(Tokens[0].getLocation());
MacroDefStartInfo = SM.getDecomposedLoc(macroStart);
- MacroExpansionStart = SM.createInstantiationLoc(macroStart,
- ExpandLocStart,
- ExpandLocEnd,
- Macro->getDefinitionLength(SM));
+ MacroExpansionStart = SM.createExpansionLoc(macroStart,
+ ExpandLocStart,
+ ExpandLocEnd,
+ Macro->getDefinitionLength(SM));
}
// If this is a function-like macro, expand the arguments and change
@@ -231,9 +231,9 @@ void TokenLexer::ExpandFunctionArguments() {
"Expected arg identifier to come from definition");
for (unsigned i = FirstResult, e = ResultToks.size(); i != e; ++i) {
Token &Tok = ResultToks[i];
- Tok.setLocation(SM.createMacroArgInstantiationLoc(Tok.getLocation(),
- curInst,
- Tok.getLength()));
+ Tok.setLocation(SM.createMacroArgExpansionLoc(Tok.getLocation(),
+ curInst,
+ Tok.getLength()));
}
}
@@ -289,9 +289,9 @@ void TokenLexer::ExpandFunctionArguments() {
for (unsigned i = ResultToks.size() - NumToks, e = ResultToks.size();
i != e; ++i) {
Token &Tok = ResultToks[i];
- Tok.setLocation(SM.createMacroArgInstantiationLoc(Tok.getLocation(),
- curInst,
- Tok.getLength()));
+ Tok.setLocation(SM.createMacroArgExpansionLoc(Tok.getLocation(),
+ curInst,
+ Tok.getLength()));
}
}
@@ -421,10 +421,10 @@ void TokenLexer::Lex(Token &Tok) {
MacroStartSLocOffset)) {
SourceLocation instLoc;
if (Tok.is(tok::comment)) {
- instLoc = SM.createInstantiationLoc(Tok.getLocation(),
- ExpandLocStart,
- ExpandLocEnd,
- Tok.getLength());
+ instLoc = SM.createExpansionLoc(Tok.getLocation(),
+ ExpandLocStart,
+ ExpandLocEnd,
+ Tok.getLength());
} else {
instLoc = getMacroExpansionLocation(Tok.getLocation());
assert(instLoc.isValid() &&
@@ -574,8 +574,7 @@ bool TokenLexer::PasteTokens(Token &Tok) {
// information so that the user knows where it came from.
SourceManager &SM = PP.getSourceManager();
SourceLocation Loc =
- SM.createInstantiationLoc(PasteOpLoc, ExpandLocStart,
- ExpandLocEnd, 2);
+ SM.createExpansionLoc(PasteOpLoc, ExpandLocStart, ExpandLocEnd, 2);
// If we're in microsoft extensions mode, downgrade this from a hard
// error to a warning that defaults to an error. This allows
// disabling it.
@@ -616,10 +615,10 @@ bool TokenLexer::PasteTokens(Token &Tok) {
assert(pasteLocInst.isValid() &&
"Expected '##' to come from definition");
- Tok.setLocation(SM.createInstantiationLoc(Tok.getLocation(),
- pasteLocInst,
- pasteLocInst,
- Tok.getLength()));
+ Tok.setLocation(SM.createExpansionLoc(Tok.getLocation(),
+ pasteLocInst,
+ pasteLocInst,
+ Tok.getLength()));
}
// Now that we got the result token, it will be subject to expansion. Since