[Openmp-commits] [openmp] [OpenMP][NFC] Extract OffloadPolicy into a helper class (PR #74029)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 1 09:31:04 PST 2023


================
@@ -0,0 +1,63 @@
+//===-- OffloadPolicy.h - Configuration of offload behavior -----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Configuration for offload behavior, e.g., if offload is disabled, can be
+// disabled, is mandatory, etc.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef OMPTARGET_OFFLOAD_POLICY_H
+#define OMPTARGET_OFFLOAD_POLICY_H
+
+#include "PluginManager.h"
+
+enum kmp_target_offload_kind_t {
+  tgt_disabled = 0,
+  tgt_default = 1,
+  tgt_mandatory = 2
+};
+
+extern "C" int __kmpc_get_target_offload(void) __attribute__((weak));
----------------
jhuber6 wrote:

Why is this weak?

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


More information about the Openmp-commits mailing list