From 347e1f621355d9b58901f3579fde91783c24ca29 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Wed, 9 Dec 2020 16:15:07 -0800 Subject: [PATCH] Frontend: Use a getVirtualFileRef for a named pipe main file, NFC --- clang/lib/Frontend/CompilerInstance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 92e5208..17875a2 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -868,8 +868,8 @@ bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input, FileMgr.getBufferForFile(&File.getFileEntry(), /*isVolatile=*/true); if (MB) { // Create a new virtual file that will have the correct size. - const FileEntry *FE = - FileMgr.getVirtualFile(InputFile, (*MB)->getBufferSize(), 0); + FileEntryRef FE = + FileMgr.getVirtualFileRef(InputFile, (*MB)->getBufferSize(), 0); SourceMgr.overrideFileContents(FE, std::move(*MB)); SourceMgr.setMainFileID( SourceMgr.createFileID(FE, SourceLocation(), Kind)); -- 2.7.4