[llvm] [OFFLOAD] Stricter enforcement of user offload disable (PR #133470)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 28 12:01:56 PDT 2025


================
@@ -46,10 +48,18 @@ class OffloadPolicy {
         Kind = DISABLED;
       }
       return;
-    };
+    }
   }
 
 public:
+  static bool isOffloadDisabled() {
+    if((kmp_target_offload_kind_t)__kmpc_get_target_offload() == 
+        tgt_disabled) {
+      return true;
+    }
+    return false;
----------------
jhuber6 wrote:

```suggestion
    return kmp_target_offload_kind_t)__kmpc_get_target_offload() ==  tgt_disabled);
```

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


More information about the llvm-commits mailing list