Skip to content

Commit 61ccee6

Browse files
committed
Revert "Reapply "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (llvm#115852)""
This reverts commit 5131c23.
1 parent 92e17b7 commit 61ccee6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lldb/source/Commands/CommandObjectTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ class CommandObjectTargetModulesDumpClangPCMInfo : public CommandObjectParsed {
22002200
}
22012201

22022202
clang::CompilerInstance compiler;
2203-
compiler.createDiagnostics(*FileSystem::Instance().GetVirtualFileSystem());
2203+
compiler.createDiagnostics(*llvm::vfs::getRealFileSystem());
22042204

22052205
const char *clang_args[] = {"clang", pcm_path};
22062206
compiler.setInvocation(clang::createInvocation(clang_args));

lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,8 @@ ClangModulesDeclVendor::Create(Target &target) {
706706
auto diag_options_up =
707707
clang::CreateAndPopulateDiagOpts(compiler_invocation_argument_cstrs);
708708
llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine> diagnostics_engine =
709-
clang::CompilerInstance::createDiagnostics(
710-
*FileSystem::Instance().GetVirtualFileSystem(),
711-
diag_options_up.release(), new StoringDiagnosticConsumer);
709+
clang::CompilerInstance::createDiagnostics(diag_options_up.release(),
710+
new StoringDiagnosticConsumer);
712711

713712
Log *log = GetLog(LLDBLog::Expressions);
714713
LLDB_LOG(log, "ClangModulesDeclVendor's compiler flags {0:$[ ]}",

0 commit comments

Comments
 (0)