[llvm] [Offload] Add Error Codes to PluginInterface (PR #138258)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon May 5 05:42:43 PDT 2025


================
@@ -0,0 +1,37 @@
+//===- Auto-generated file, part of the LLVM/Offload project --------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef OFFLOAD_ERRC
+#error Please define the macro OFFLOAD_ERRCODE(Name, Desc, Value)
+#endif
+
+// Error codes are shared between PluginInterface and liboffload.
+// To add new error codes, add them to offload/liboffload/API/Common.td and run
+// the GenerateOffload target.
+
+OFFLOAD_ERRC(SUCCESS, "Success", 0)
+OFFLOAD_ERRC(UNKNOWN, "Unknown or internal error", 1)
----------------
jhuber6 wrote:

Yeah, I guess it serves as a form of comment for usage, but I'm just saying in general that these will likely be unused internally.

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


More information about the llvm-commits mailing list