diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp b/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp index 0453098..d569100 100644 --- a/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp +++ b/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp @@ -87,7 +87,7 @@ static void LexRawTokensFromMainFile(Preprocessor &PP, /// RewriteMacrosInInput - Implement -rewrite-macros mode. -void clang::RewriteMacrosInInput(Preprocessor &PP, llvm::raw_ostream *OS) { +void clang::RewriteMacrosInInput(Preprocessor &PP, raw_ostream *OS) { SourceManager &SM = PP.getSourceManager(); Rewriter Rewrite; @@ -112,7 +112,7 @@ void clang::RewriteMacrosInInput(Preprocessor &PP, llvm::raw_ostream *OS) { // that aren't in the preprocessed view, we have macros that expand to no // tokens, or macro arguments etc. while (RawTok.isNot(tok::eof) || PPTok.isNot(tok::eof)) { - SourceLocation PPLoc = SM.getInstantiationLoc(PPTok.getLocation()); + SourceLocation PPLoc = SM.getExpansionLoc(PPTok.getLocation()); // If PPTok is from a different source file, ignore it. if (!SM.isFromMainFile(PPLoc)) { @@ -197,7 +197,7 @@ void clang::RewriteMacrosInInput(Preprocessor &PP, llvm::raw_ostream *OS) { while (PPOffs < RawOffs) { Expansion += ' ' + PP.getSpelling(PPTok); PP.Lex(PPTok); - PPLoc = SM.getInstantiationLoc(PPTok.getLocation()); + PPLoc = SM.getExpansionLoc(PPTok.getLocation()); PPOffs = SM.getFileOffset(PPLoc); } Expansion += ' '; |