diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2024-11-21 13:04:30 +0100 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2024-11-21 13:04:30 +0100 |
commit | a1153cd6fedd4c906a9840987934ca4712e34cb2 (patch) | |
tree | 5b267500546cc06032b49c0153f6aa1e92cbb74c /clang/unittests/Frontend/FrontendActionTest.cpp | |
parent | 0b06301a1d839eb5f73559f6c3daf9049c34f3af (diff) | |
download | llvm-a1153cd6fedd4c906a9840987934ca4712e34cb2.zip llvm-a1153cd6fedd4c906a9840987934ca4712e34cb2.tar.gz llvm-a1153cd6fedd4c906a9840987934ca4712e34cb2.tar.bz2 |
Revert "[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)"
Reverted for causing:
https://github.com/llvm/llvm-project/issues/117145
This reverts commit bdd10d9d249bd1c2a45e3de56a5accd97e953458.
Diffstat (limited to 'clang/unittests/Frontend/FrontendActionTest.cpp')
-rw-r--r-- | clang/unittests/Frontend/FrontendActionTest.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/unittests/Frontend/FrontendActionTest.cpp b/clang/unittests/Frontend/FrontendActionTest.cpp index 75e1667..6ce9ba6 100644 --- a/clang/unittests/Frontend/FrontendActionTest.cpp +++ b/clang/unittests/Frontend/FrontendActionTest.cpp @@ -20,7 +20,6 @@ #include "clang/Serialization/InMemoryModuleCache.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/ToolOutputFile.h" -#include "llvm/Support/VirtualFileSystem.h" #include "llvm/TargetParser/Triple.h" #include "gtest/gtest.h" @@ -91,7 +90,7 @@ TEST(ASTFrontendAction, Sanity) { invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu"; CompilerInstance compiler; compiler.setInvocation(std::move(invocation)); - compiler.createDiagnostics(*llvm::vfs::getRealFileSystem()); + compiler.createDiagnostics(); TestASTFrontendAction test_action; ASSERT_TRUE(compiler.ExecuteAction(test_action)); @@ -111,7 +110,7 @@ TEST(ASTFrontendAction, IncrementalParsing) { invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu"; CompilerInstance compiler; compiler.setInvocation(std::move(invocation)); - compiler.createDiagnostics(*llvm::vfs::getRealFileSystem()); + compiler.createDiagnostics(); TestASTFrontendAction test_action(/*enableIncrementalProcessing=*/true); ASSERT_TRUE(compiler.ExecuteAction(test_action)); @@ -138,7 +137,7 @@ TEST(ASTFrontendAction, LateTemplateIncrementalParsing) { invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu"; CompilerInstance compiler; compiler.setInvocation(std::move(invocation)); - compiler.createDiagnostics(*llvm::vfs::getRealFileSystem()); + compiler.createDiagnostics(); TestASTFrontendAction test_action(/*enableIncrementalProcessing=*/true, /*actOnEndOfTranslationUnit=*/true); @@ -184,7 +183,7 @@ TEST(PreprocessorFrontendAction, EndSourceFile) { Invocation->getTargetOpts().Triple = "i386-unknown-linux-gnu"; CompilerInstance Compiler; Compiler.setInvocation(std::move(Invocation)); - Compiler.createDiagnostics(*llvm::vfs::getRealFileSystem()); + Compiler.createDiagnostics(); TestPPCallbacks *Callbacks = new TestPPCallbacks; TestPPCallbacksFrontendAction TestAction(Callbacks); @@ -246,8 +245,7 @@ TEST(ASTFrontendAction, ExternalSemaSource) { CompilerInstance Compiler; Compiler.setInvocation(std::move(Invocation)); auto *TDC = new TypoDiagnosticConsumer; - Compiler.createDiagnostics(*llvm::vfs::getRealFileSystem(), TDC, - /*ShouldOwnClient=*/true); + Compiler.createDiagnostics(TDC, /*ShouldOwnClient=*/true); Compiler.setExternalSemaSource(new TypoExternalSemaSource(Compiler)); SyntaxOnlyAction TestAction; @@ -279,7 +277,7 @@ TEST(GeneratePCHFrontendAction, CacheGeneratedPCH) { Invocation->getTargetOpts().Triple = "x86_64-apple-darwin19.0.0"; CompilerInstance Compiler; Compiler.setInvocation(std::move(Invocation)); - Compiler.createDiagnostics(*llvm::vfs::getRealFileSystem()); + Compiler.createDiagnostics(); GeneratePCHAction TestAction; ASSERT_TRUE(Compiler.ExecuteAction(TestAction)); |