diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-03-26 22:32:06 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2019-03-26 22:32:06 +0000 |
commit | db8a742206749b2677c78d0125a21968a7df37b3 (patch) | |
tree | 91edaf8086e0428cd113bb6ca9b5e1e0b0ca0486 /clang/unittests/AST/ASTImporterTest.cpp | |
parent | 1da7eac87c15662f808f69e260e3ec47923c28f6 (diff) | |
download | bcm5719-llvm-db8a742206749b2677c78d0125a21968a7df37b3.tar.gz bcm5719-llvm-db8a742206749b2677c78d0125a21968a7df37b3.zip |
Basic: Return a reference from FileManager::getVirtualFileSystem, NFC
FileManager constructs a VFS in its constructor if it isn't passed one,
and there's no way to reset it. Make that contract clear by returning a
reference from its accessor.
https://reviews.llvm.org/D59388
llvm-svn: 357038
Diffstat (limited to 'clang/unittests/AST/ASTImporterTest.cpp')
-rw-r--r-- | clang/unittests/AST/ASTImporterTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index d6bd1349856..a282e2a0244 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -44,7 +44,7 @@ createVirtualFileIfNeeded(ASTUnit *ToAST, StringRef FileName, assert(ToAST); ASTContext &ToCtx = ToAST->getASTContext(); auto *OFS = static_cast<llvm::vfs::OverlayFileSystem *>( - ToCtx.getSourceManager().getFileManager().getVirtualFileSystem().get()); + &ToCtx.getSourceManager().getFileManager().getVirtualFileSystem()); auto *MFS = static_cast<llvm::vfs::InMemoryFileSystem *>( OFS->overlays_begin()->get()); MFS->addFile(FileName, 0, std::move(Buffer)); |