Files
clang-p2996/offload/tools/offload-tblgen/Generators.hpp
Ross Brunton 1532ee6916 [Offload] Add Error Codes to PluginInterface (#138258)
A new ErrorCode enumeration is present in PluginInterface which can
be used when returning an llvm::Error from offload and PluginInterface
functions.

This enum must be kept up to sync with liboffload's ol_errc_t enum, so
both are automatically generated from liboffload's enum definition.

Some error codes have also been shuffled around to allow for future
work. Note that this patch only adds the machinery; actual error codes
will be added in a future patch.

~~Depends on #137339 , please ignore first commit of this MR.~~ This has
been merged.
2025-05-19 09:38:34 -05:00

26 lines
1.1 KiB
C++

//===- offload-tblgen/Generators.hpp - Offload generator declarations -----===//
//
// 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
//
//===----------------------------------------------------------------------===//
#pragma once
#include "llvm/TableGen/Record.h"
void EmitOffloadAPI(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
void EmitOffloadFuncNames(const llvm::RecordKeeper &Records,
llvm::raw_ostream &OS);
void EmitOffloadImplFuncDecls(const llvm::RecordKeeper &Records,
llvm::raw_ostream &OS);
void EmitOffloadEntryPoints(const llvm::RecordKeeper &Records,
llvm::raw_ostream &OS);
void EmitOffloadPrintHeader(const llvm::RecordKeeper &Records,
llvm::raw_ostream &OS);
void EmitOffloadExports(const llvm::RecordKeeper &Records,
llvm::raw_ostream &OS);
void EmitOffloadErrcodes(const llvm::RecordKeeper &Records,
llvm::raw_ostream &OS);