aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-14 11:11:09 -0400
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-19 19:10:21 -0400
commitb3eff6b7bb31e7ef059a3d238de138849839fbbd (patch)
tree272f6e35d4c60e81b3cab9258f24cc4d9e1a53d9 /clang/lib/Frontend/FrontendActions.cpp
parent57211fd239a3a3efe89f0b7091f86a167f8301ff (diff)
downloadllvm-b3eff6b7bb31e7ef059a3d238de138849839fbbd.zip
llvm-b3eff6b7bb31e7ef059a3d238de138849839fbbd.tar.gz
llvm-b3eff6b7bb31e7ef059a3d238de138849839fbbd.tar.bz2
Lexer: Update the Lexer to use MemoryBufferRef, NFC
Update `Lexer` / `Lexer::Lexer` to use `MemoryBufferRef` instead of `MemoryBuffer*`. Callers that were acquiring a `MemoryBuffer*` via `SourceManager::getBuffer` were updated, such that if they checked `Invalid` they use `getBufferOrNone` and otherwise `getBufferOrFake`. Differential Revision: https://reviews.llvm.org/D89398
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index ec5cace..c651a1a 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -750,7 +750,7 @@ void DumpRawTokensAction::ExecuteAction() {
SourceManager &SM = PP.getSourceManager();
// Start lexing the specified input file.
- const llvm::MemoryBuffer *FromFile = SM.getBuffer(SM.getMainFileID());
+ llvm::MemoryBufferRef FromFile = SM.getBufferOrFake(SM.getMainFileID());
Lexer RawLex(SM.getMainFileID(), FromFile, SM, PP.getLangOpts());
RawLex.SetKeepWhitespaceMode(true);