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
Loading
Please register or sign in to comment