From df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Thu, 21 Nov 2024 13:04:30 +0100 Subject: Reapply "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)" This reverts commit a1153cd6fedd4c906a9840987934ca4712e34cb2 with fixes to lldb breakages. Fixes https://github.com/llvm/llvm-project/issues/117145. --- clang/unittests/Frontend/CompilerInvocationTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp') diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp index 45478de..4ff6824 100644 --- a/clang/unittests/Frontend/CompilerInvocationTest.cpp +++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp @@ -12,6 +12,7 @@ #include "clang/Frontend/TextDiagnosticBuffer.h" #include "clang/Lex/PreprocessorOptions.h" #include "clang/Serialization/ModuleFileExtension.h" +#include "llvm/Support/VirtualFileSystem.h" #include "llvm/TargetParser/Host.h" #include "gmock/gmock.h" @@ -38,9 +39,9 @@ public: } CommandLineTest() - : Diags(CompilerInstance::createDiagnostics(new DiagnosticOptions(), - new TextDiagnosticBuffer())) { - } + : Diags(CompilerInstance::createDiagnostics( + *llvm::vfs::getRealFileSystem(), new DiagnosticOptions(), + new TextDiagnosticBuffer())) {} }; template -- cgit v1.1