================ @@ -1236,6 +1238,23 @@ DerivedArgList getLinkerArgs(ArrayRef<OffloadFile> Input, Args.MakeArgString(Value)); } + // Forward '-Xoffload-compiler' options to the appropriate backend. + for (StringRef Arg : Args.getAllArgValues(OPT_device_compiler_args_EQ)) { + auto [Triple, Value] = Arg.split('='); + llvm::Triple TT(Triple); + // If this isn't a recognized triple then it's an `arg=value` option. + if (TT.getArch() <= Triple::ArchType::UnknownArch || + TT.getArch() > Triple::ArchType::LastArchType) ---------------- arsenm wrote:
I'd expect Triple to have an isvalid or operator bool or something instead of needing to do this range check https://github.com/llvm/llvm-project/pull/101032 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits