[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 07:32:33 PST 2025


================
@@ -1109,6 +1109,11 @@ class Triple {
            Env == llvm::Triple::EABIHF;
   }
 
+  /// Tests if the target represents a device which can be offloaded to.
+  bool isOffloadingTarget() const {
+    return isAMDGPU() || isNVPTX() || isSPIRV();
+  }
----------------
sarnex wrote:

Sorry, was OOO. Will work to address this soon.

https://github.com/llvm/llvm-project/pull/126956


More information about the cfe-commits mailing list