Skip to content

Commit 143b065

Browse files
committed
Update file system API to match the current Clang version
1 parent 94e1b34 commit 143b065

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

common_clang.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,13 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,
235235

236236
compiler->setDiagnostics(&*Diags);
237237

238-
auto OverlayFS = new llvm::vfs::OverlayFileSystem(
239-
llvm::vfs::getRealFileSystem());
240-
auto MemFS = new llvm::vfs::InMemoryFileSystem();
238+
llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS(
239+
new llvm::vfs::OverlayFileSystem(llvm::vfs::getRealFileSystem()));
240+
llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> MemFS(
241+
new llvm::vfs::InMemoryFileSystem);
241242
OverlayFS->pushOverlay(MemFS);
242243

243-
compiler->setVirtualFileSystem(OverlayFS);
244-
245-
compiler->createFileManager();
244+
compiler->createFileManager(OverlayFS);
246245
compiler->createSourceManager(compiler->getFileManager());
247246

248247
// Create compiler invocation from user args before trickering with it

0 commit comments

Comments
 (0)