Migrate to the `FileEntryRef` overload of `SourceManager::createFileID`
(using `FileManager::getOptionalFileRef`) in RefactoringTest.cpp and
RewriterTestContext.h.
No functionality change.
Differential Revision: https://reviews.llvm.org/D92967
llvm::raw_fd_ostream OutStream(FD, true);
OutStream << Content;
OutStream.close();
- auto File = Context.Files.getFile(Path);
+ auto File = Context.Files.getOptionalFileRef(Path);
assert(File);
StringRef Found =
llvm::MemoryBuffer::getMemBuffer(Content);
InMemoryFileSystem->addFile(Name, 0, std::move(Source));
- auto Entry = Files.getFile(Name);
+ auto Entry = Files.getOptionalFileRef(Name);
assert(Entry);
return Sources.createFileID(*Entry, SourceLocation(), SrcMgr::C_User);
}
llvm::raw_fd_ostream OutStream(FD, true);
OutStream << Content;
OutStream.close();
- auto File = Files.getFile(Path);
+ auto File = Files.getOptionalFileRef(Path);
assert(File);
StringRef Found =