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
33OffloadConfig &offloadConfig() {
34 static OffloadConfig Config{};
35 return Config;
36}
37
38namespace llvm {
39namespace offload {
40// Pull in the declarations for the implementation functions. The actual entry
41// points in this file wrap these.
42#include "OffloadImplFuncDecls.inc"
43} // namespace offload
44} // namespace llvm
45
46// Pull in the tablegen'd entry point definitions.
47#include "OffloadEntryPoints.inc"
48

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