[PATCH] D141551: Require input target triples to have Environment field

Jacob Lambert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 11 15:52:07 PST 2023


lamb-j created this revision.
Herald added a project: All.
lamb-j requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141551

Files:
  clang/lib/Driver/OffloadBundler.cpp


Index: clang/lib/Driver/OffloadBundler.cpp
===================================================================
--- clang/lib/Driver/OffloadBundler.cpp
+++ clang/lib/Driver/OffloadBundler.cpp
@@ -107,7 +107,8 @@
 }
 
 bool OffloadTargetInfo::isTripleValid() const {
-  return !Triple.str().empty() && Triple.getArch() != Triple::UnknownArch;
+  return !Triple.str().empty() && Triple.getArch() != Triple::UnknownArch &&
+    Triple.hasEnvironment();
 }
 
 bool OffloadTargetInfo::operator==(const OffloadTargetInfo &Target) const {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141551.488405.patch
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230111/e726bc21/attachment.bin>


More information about the cfe-commits mailing list