summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ExpressionParser/Clang
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-03-26 22:18:52 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-03-26 22:18:52 +0000
commit1da7eac87c15662f808f69e260e3ec47923c28f6 (patch)
tree200e20c53a6506ef729d433f6587de98937af73d /lldb/source/Plugins/ExpressionParser/Clang
parent19c45546fc70d705ce3b470fca4289f33d0cdc20 (diff)
downloadbcm5719-llvm-1da7eac87c15662f808f69e260e3ec47923c28f6.tar.gz
bcm5719-llvm-1da7eac87c15662f808f69e260e3ec47923c28f6.zip
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 llvm-svn: 357037
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp3
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 7589c371e2c..f9ddb75ade9 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -309,8 +309,7 @@ ClangExpressionParser::ClangExpressionParser(
}
// 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
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 05294927a15..993843fd721 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -679,7 +679,7 @@ ClangModulesDeclVendor::Create(Target &target) {
}
// 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);
OpenPOWER on IntegriCloud