1//===- offload_lib.cpp - Entry points for the new LLVM/Offload API --------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file pulls in the tablegen'd API entry point functions.
10//
11//===----------------------------------------------------------------------===//
12
13#include "OffloadImpl.hpp"
14#include "llvm/Support/raw_ostream.h"
15#include <OffloadAPI.h>
16#include <OffloadPrint.hpp>
17
18llvm::StringSet<> &errorStrs() {
19 static llvm::StringSet<> ErrorStrs;
20 return ErrorStrs;
21}
22
23ErrSetT &errors() {
24 static ErrSetT Errors{};
25 return Errors;
26}
27
28ol_code_location_t *&currentCodeLocation() {
29 thread_local ol_code_location_t *CodeLoc = nullptr;
30 return CodeLoc;
31}
32
33namespace llvm {
34namespace offload {
35// Pull in the declarations for the implementation functions. The actual entry
36// points in this file wrap these.
37#include "OffloadImplFuncDecls.inc"
38} // namespace offload
39} // namespace llvm
40
41// Pull in the tablegen'd entry point definitions.
42#include "OffloadEntryPoints.inc"
43

source code of offload/liboffload/src/OffloadLib.cpp