Files
clang-p2996/clang/tools/clang-linker-wrapper/OffloadWrapper.h
Joseph Huber 19fac745e3 [OpenMP] Remove call to 'clang-offload-wrapper' binary
Summary:
This patch removes the system call to the `clang-offload-wrapper` tool
by replicating its functionality in a new file. This improves
performance and makes the future wrapping functionality easier to
change.

Differential Revision: https://reviews.llvm.org/D118198
2022-01-31 23:11:43 -05:00

21 lines
832 B
C++

//===- OffloadWrapper.h -------------------------------------------*- C++ -*-===//
//
// 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 LLVM_CLANG_TOOLS_CLANG_LINKER_WRAPPER_OFFLOAD_WRAPPER_H
#define LLVM_CLANG_TOOLS_CLANG_LINKER_WRAPPER_OFFLOAD_WRAPPER_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/IR/Module.h"
/// Wrap the input device images into the module \p M as global symbols and
/// registers the images with the OpenMP Offloading runtime libomptarget.
llvm::Error wrapBinaries(llvm::Module &M,
llvm::ArrayRef<llvm::ArrayRef<char>> Images);
#endif