[Lldb-commits] [lldb] r357037 - Frontend: Remove CompilerInstance::VirtualFileSystem, NFC
Duncan P. N. Exon Smith via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 26 15:18:53 PDT 2019
Author: dexonsmith
Date: Tue Mar 26 15:18:52 2019
New Revision: 357037
URL: http://llvm.org/viewvc/llvm-project?rev=357037&view=rev
Log:
Frontend: Remove CompilerInstance::VirtualFileSystem, NFC
Remove CompilerInstance::VirtualFileSystem and
CompilerInstance::setVirtualFileSystem, instead relying on the VFS in
the FileManager. CompilerInstance and its clients already went to some
trouble to make these match. Now they are guaranteed to match.
As part of this, I added a VFS parameter (defaults to nullptr) to
CompilerInstance::createFileManager, to avoid repeating construction
logic in clients that just wanted to customize the VFS.
https://reviews.llvm.org/D59377
Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=357037&r1=357036&r2=357037&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Tue Mar 26 15:18:52 2019
@@ -309,8 +309,7 @@ ClangExpressionParser::ClangExpressionPa
}
// Make sure clang uses the same VFS as LLDB.
- m_compiler->setVirtualFileSystem(
- FileSystem::Instance().GetVirtualFileSystem());
+ m_compiler->createFileManager(FileSystem::Instance().GetVirtualFileSystem());
lldb::LanguageType frame_lang =
expr.Language(); // defaults to lldb::eLanguageTypeUnknown
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp?rev=357037&r1=357036&r2=357037&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp Tue Mar 26 15:18:52 2019
@@ -679,7 +679,7 @@ ClangModulesDeclVendor::Create(Target &t
}
// Make sure clang uses the same VFS as LLDB.
- instance->setVirtualFileSystem(FileSystem::Instance().GetVirtualFileSystem());
+ instance->createFileManager(FileSystem::Instance().GetVirtualFileSystem());
instance->setDiagnostics(diagnostics_engine.get());
instance->setInvocation(invocation);
More information about the lldb-commits
mailing list