aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-09-18 14:53:40 -0700
committerGitHub <noreply@github.com>2025-09-18 14:53:40 -0700
commit152a2162a1a9c93358bb69ab839931d95b9537ad (patch)
tree287401779a7a607784aaa29c420d0c8ffeb682c8 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
parentcfaf23927c6b083646a431eb8eea2d286694c0a0 (diff)
downloadllvm-152a2162a1a9c93358bb69ab839931d95b9537ad.zip
llvm-152a2162a1a9c93358bb69ab839931d95b9537ad.tar.gz
llvm-152a2162a1a9c93358bb69ab839931d95b9537ad.tar.bz2
[llvm][clang] Pass VFS to `llvm::cl` command line handling (#159174)
This PR passes the VFS down to `llvm::cl` functions so that they don't assume the real file system.
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r--clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 1621242..c8aad4d 100644
--- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -244,7 +244,9 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) {
for (unsigned i = 0; i != NumArgs; ++i)
Args[i + 1] = Clang->getFrontendOpts().LLVMArgs[i].c_str();
Args[NumArgs + 1] = nullptr;
- llvm::cl::ParseCommandLineOptions(NumArgs + 1, Args.get());
+ llvm::cl::ParseCommandLineOptions(NumArgs + 1, Args.get(), /*Overview=*/"",
+ /*Errs=*/nullptr,
+ /*VFS=*/&Clang->getVirtualFileSystem());
}
#if CLANG_ENABLE_STATIC_ANALYZER