================ @@ -1214,7 +1214,13 @@ DerivedArgList getLinkerArgs(ArrayRef<OffloadFile> Input, // Forward '-Xoffload-linker' options to the appropriate backend. for (StringRef Arg : Args.getAllArgValues(OPT_device_linker_args_EQ)) { auto [Triple, Value] = Arg.split('='); - if (Value.empty()) + 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) ---------------- jhuber6 wrote:
Good catch ```suggestion TT.getArch() > Triple::ArchType::LastArchType) ``` https://github.com/llvm/llvm-project/pull/100270 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits