diff options
author | Joseph Huber <huberjn@outlook.com> | 2025-07-04 16:20:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-04 16:20:53 -0500 |
commit | 6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f (patch) | |
tree | 6cdbdbe738836c70a352dec2cf690544ae5e046a /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 454e4e3e29d835d4487799c014223a045f3d1d84 (diff) | |
download | llvm-6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f.zip llvm-6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f.tar.gz llvm-6db02dc4311b3ee52ec6e7e5e5cafb2600e7b30f.tar.bz2 |
[Clang] Introduce `--offload-targets` for `-fopenmp-targets` (#146594)
Summary:
This patch is mostly an NFC that renames the existing `-fopenmp-targets`
into `--offload-targets`. Doing this early to simplify a follow-up patch
that will hopefully allow this syntax to be used more generically over
the existing `--offload` syntax (which I think is mostly unmaintained
now.). Following in the well-trodden path of trying to pull language
specific offload options into generic ones, but right now this is still
just OpenMP specific.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 9b3200b..6633e4a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3891,7 +3891,7 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, llvm::interleave( Opts.OMPTargetTriples, OS, [&OS](const llvm::Triple &T) { OS << T.str(); }, ","); - GenerateArg(Consumer, OPT_fopenmp_targets_EQ, Targets); + GenerateArg(Consumer, OPT_offload_targets_EQ, Targets); } if (!Opts.OMPHostIRFile.empty()) @@ -4322,7 +4322,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.OpenMPIRBuilder = Opts.OpenMP && Args.hasArg(options::OPT_fopenmp_enable_irbuilder); bool IsTargetSpecified = - Opts.OpenMPIsTargetDevice || Args.hasArg(options::OPT_fopenmp_targets_EQ); + Opts.OpenMPIsTargetDevice || Args.hasArg(options::OPT_offload_targets_EQ); if (Opts.OpenMP || Opts.OpenMPSimd) { if (int Version = getLastArgIntValue( @@ -4382,7 +4382,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, } // Get the OpenMP target triples if any. - if (Arg *A = Args.getLastArg(options::OPT_fopenmp_targets_EQ)) { + if (Arg *A = Args.getLastArg(options::OPT_offload_targets_EQ)) { enum ArchPtrSize { Arch16Bit, Arch32Bit, Arch64Bit }; auto getArchPtrSize = [](const llvm::Triple &T) { if (T.isArch16Bit()) |