diff options
author | kadir çetinkaya <kadircet@google.com> | 2024-11-21 12:11:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-21 12:11:41 +0100 |
commit | bdd10d9d249bd1c2a45e3de56a5accd97e953458 (patch) | |
tree | 5d4c81d8e95dfcecaae9fec5e6a52845fd3023d5 /clang/unittests/Driver/ToolChainTest.cpp | |
parent | 83c7784c35918ce037823f29d29918c5542cdf9c (diff) | |
download | llvm-bdd10d9d249bd1c2a45e3de56a5accd97e953458.zip llvm-bdd10d9d249bd1c2a45e3de56a5accd97e953458.tar.gz llvm-bdd10d9d249bd1c2a45e3de56a5accd97e953458.tar.bz2 |
[NFC] Explicitly pass a VFS when creating DiagnosticsEngine (#115852)
Starting with 41e3919ded78d8870f7c95e9181c7f7e29aa3cc4 DiagnosticsEngine
creation might perform IO. It was implicitly defaulting to
getRealFileSystem. This patch makes it explicit by pushing the decision
making to callers.
It uses ambient VFS if one is available, and keeps using
`getRealFileSystem` if there aren't any VFS.
Diffstat (limited to 'clang/unittests/Driver/ToolChainTest.cpp')
-rw-r--r-- | clang/unittests/Driver/ToolChainTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp index 8542a16..0787e7d 100644 --- a/clang/unittests/Driver/ToolChainTest.cpp +++ b/clang/unittests/Driver/ToolChainTest.cpp @@ -577,7 +577,7 @@ TEST(CompilerInvocation, SplitSwarfSingleCrash) { TEST(ToolChainTest, UEFICallingConventionTest) { clang::CompilerInstance compiler; - compiler.createDiagnostics(); + compiler.createDiagnostics(*llvm::vfs::getRealFileSystem()); std::string TrStr = "x86_64-unknown-uefi"; llvm::Triple Tr(TrStr); |