aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-09-02 13:04:13 -0700
committerGitHub <noreply@github.com>2025-09-02 13:04:13 -0700
commita24e11fd951d3396ccbb469b2c5dc707dc4196a6 (patch)
tree37bb9ca7a91eb22977d5282ab8d3cbe265159b25 /clang/lib/Frontend/CompilerInvocation.cpp
parent1a4d0c6dfe9d717215890650a42a53d4ec9bfd8f (diff)
downloadllvm-a24e11fd951d3396ccbb469b2c5dc707dc4196a6.zip
llvm-a24e11fd951d3396ccbb469b2c5dc707dc4196a6.tar.gz
llvm-a24e11fd951d3396ccbb469b2c5dc707dc4196a6.tar.bz2
[clang] Delay checking of `-fopenmp-host-ir-file-path` (#150124)
This PR is part of an effort to remove file system usage from the command line parsing code. The reason for that is that it's impossible to do file system access correctly without a configured VFS, and the VFS can only be configured after the command line is parsed. I don't want to intertwine command line parsing and VFS configuration, so I decided to perform the file system access after the command line is parsed and the VFS is configured - ideally right before the file system entity is used for the first time. This patch delays opening the OpenMP host IR file until codegen.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index f8fecba..8411d00 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3919,9 +3919,6 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts,
GenerateArg(Consumer, OPT_offload_targets_EQ, Targets);
}
- if (!Opts.OMPHostIRFile.empty())
- GenerateArg(Consumer, OPT_fopenmp_host_ir_file_path, Opts.OMPHostIRFile);
-
if (Opts.OpenMPCUDAMode)
GenerateArg(Consumer, OPT_fopenmp_cuda_mode);
@@ -4388,15 +4385,6 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
}
}
- // Get OpenMP host file path if any and report if a non existent file is
- // found
- if (Arg *A = Args.getLastArg(options::OPT_fopenmp_host_ir_file_path)) {
- Opts.OMPHostIRFile = A->getValue();
- if (!llvm::sys::fs::exists(Opts.OMPHostIRFile))
- Diags.Report(diag::err_drv_omp_host_ir_file_not_found)
- << Opts.OMPHostIRFile;
- }
-
// Set CUDA mode for OpenMP target NVPTX/AMDGCN if specified in options
Opts.OpenMPCUDAMode = Opts.OpenMPIsTargetDevice &&
(T.isNVPTX() || T.isAMDGCN()) &&