clang/Basic: Replace SourceManager::getMemoryBufferForFile, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 14 Oct 2020 22:06:29 +0000 (18:06 -0400)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 20 Oct 2020 21:01:23 +0000 (17:01 -0400)
commit2dc7e0c6a586135fe236cd7ebf065617a7638bdb
tree9d75fd6071d23062e6bfdb9a605d4106308f087d
parente557b6a66d5476dd5b9905934099f5f7357310b8
clang/Basic: Replace SourceManager::getMemoryBufferForFile, NFC

Replace `SourceManager::getMemoryBufferForFile`, which returned a
dereferenceable `MemoryBuffer*` and had a `bool*Invalid` out parameter,
with `getMemoryBufferForFileOrNone` (returning
`Optional<MemoryBufferRef>`) and `getMemoryBufferForFileOrFake`
(returning `MemoryBufferRef`).

Differential Revision: https://reviews.llvm.org/D89429
clang/include/clang/Basic/SourceManager.h
clang/include/clang/Frontend/PrecompiledPreamble.h
clang/lib/Basic/SourceManager.cpp
clang/lib/Frontend/PrecompiledPreamble.cpp
clang/lib/Lex/Preprocessor.cpp