43 lines · cpp
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-exception6//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 *¤tCodeLocation() {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 entry36// points in this file wrap these.37#include "OffloadImplFuncDecls.inc"38} // namespace offload39} // namespace llvm40 41// Pull in the tablegen'd entry point definitions.42#include "OffloadEntryPoints.inc"43