#include "llvm/Object/OffloadBinary.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Module.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/ArchiveWriter.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/Error.h"
#include "llvm/Object/IRObjectFile.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/SourceMgr.h"
usingnamespacellvm;
usingnamespacellvm::object;
namespace {
Error extractOffloadFiles(MemoryBufferRef Contents,
SmallVectorImpl<OffloadFile> &Binaries) { … }
Error extractFromObject(const ObjectFile &Obj,
SmallVectorImpl<OffloadFile> &Binaries) { … }
Error extractFromBitcode(MemoryBufferRef Buffer,
SmallVectorImpl<OffloadFile> &Binaries) { … }
Error extractFromArchive(const Archive &Library,
SmallVectorImpl<OffloadFile> &Binaries) { … }
}
Expected<std::unique_ptr<OffloadBinary>>
OffloadBinary::create(MemoryBufferRef Buf) { … }
SmallString<0> OffloadBinary::write(const OffloadingImage &OffloadingData) { … }
Error object::extractOffloadBinaries(MemoryBufferRef Buffer,
SmallVectorImpl<OffloadFile> &Binaries) { … }
OffloadKind object::getOffloadKind(StringRef Name) { … }
StringRef object::getOffloadKindName(OffloadKind Kind) { … }
ImageKind object::getImageKind(StringRef Name) { … }
StringRef object::getImageKindName(ImageKind Kind) { … }
bool object::areTargetsCompatible(const OffloadFile::TargetID &LHS,
const OffloadFile::TargetID &RHS) { … }