[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 18 08:44:05 PST 2024


================
@@ -582,6 +582,10 @@ class Driver {
   /// @name Helper Methods
   /// @{
 
+  /// getSYCLDeviceTriple - Returns the SYCL device triple for the
+  /// specified ArchType.
+  llvm::Triple getSYCLDeviceTriple(StringRef TargetArch = "spir64") const;
----------------
tahonermann wrote:

It doesn't look like `getSYCLDeviceTriple()` needs to be exposed in the header. Can this just be a `static` function in `Driver.cpp`? There are similar `static` functions there for CUDA and HIP; see `getNVIDIAOffloadTargetTriple()` and `getHIPOffloadTargetTriple()`. I think this should follow that precedent if there isn't a good reason to deviate.

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


More information about the cfe-commits mailing list