[all-commits] [llvm/llvm-project] 51d1d5: clang/Frontend: Use MemoryBufferRef in FrontendInp...
Duncan P. N. Exon Smith via All-commits
all-commits at lists.llvm.org
Tue Oct 20 10:36:09 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 51d1d585e5838ea0f02f1271f7543c4e43639969
https://github.com/llvm/llvm-project/commit/51d1d585e5838ea0f02f1271f7543c4e43639969
Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
Date: 2020-10-20 (Tue, 20 Oct 2020)
Changed paths:
M clang/include/clang/Basic/SourceManager.h
M clang/include/clang/Frontend/FrontendAction.h
M clang/include/clang/Frontend/FrontendOptions.h
M clang/lib/Basic/SourceManager.cpp
M clang/lib/Format/MacroExpander.cpp
M clang/lib/Frontend/ASTUnit.cpp
M clang/lib/Frontend/CompilerInstance.cpp
M clang/lib/Frontend/FrontendAction.cpp
M clang/lib/Frontend/FrontendActions.cpp
M clang/unittests/Format/TestLexer.h
Log Message:
-----------
clang/Frontend: Use MemoryBufferRef in FrontendInputFile (and remove SourceManager::getBuffer)
In order to drop the final callers to `SourceManager::getBuffer`, change
`FrontendInputFile` to use `Optional<MemoryBufferRef>`. Also updated
the "unowned" version of `SourceManager::createFileID` to take a
`MemoryBufferRef` (it now calls `MemoryBuffer::getMemBuffer`, which
creates a `MemoryBuffer` that does not own the buffer data).
Differential Revision: https://reviews.llvm.org/D89427
More information about the All-commits
mailing list