aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/TokenRewriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Rewrite/TokenRewriter.cpp')
-rw-r--r--lib/Rewrite/TokenRewriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Rewrite/TokenRewriter.cpp b/lib/Rewrite/TokenRewriter.cpp
index f288ac2402..85d83c2dea 100644
--- a/lib/Rewrite/TokenRewriter.cpp
+++ b/lib/Rewrite/TokenRewriter.cpp
@@ -18,14 +18,14 @@
#include "clang/Basic/SourceManager.h"
using namespace clang;
-TokenRewriter::TokenRewriter(unsigned FileID, SourceManager &SM,
+TokenRewriter::TokenRewriter(FileID FID, SourceManager &SM,
const LangOptions &LangOpts) {
ScratchBuf.reset(new ScratchBuffer(SM));
- std::pair<const char*,const char*> File = SM.getBufferData(FileID);
+ std::pair<const char*,const char*> File = SM.getBufferData(FID);
// Create a lexer to lex all the tokens of the main file in raw mode.
- Lexer RawLex(SourceLocation::getFileLoc(FileID, 0),
+ Lexer RawLex(SM.getLocForStartOfFile(FID),
LangOpts, File.first, File.second);
// Return all comments and whitespace as tokens.