#ifndef LLVM_OBJECT_BINARY_H
#define LLVM_OBJECT_BINARY_H
#include "llvm-c/Types.h"
#include "llvm/Object/Error.h"
#include "llvm/Support/CBindingWrapping.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/TargetParser/Triple.h"
#include <memory>
#include <utility>
namespace llvm {
class LLVMContext;
class StringRef;
namespace object {
class Binary { … };
DEFINE_ISA_CONVERSION_FUNCTIONS(…)
Expected<std::unique_ptr<Binary>> createBinary(MemoryBufferRef Source,
LLVMContext *Context = nullptr,
bool InitContent = true);
template <typename T> class OwningBinary { … };
template <typename T>
OwningBinary<T>::OwningBinary(std::unique_ptr<T> Bin,
std::unique_ptr<MemoryBuffer> Buf)
: … { … }
template <typename T> OwningBinary<T>::OwningBinary() = default;
template <typename T>
OwningBinary<T>::OwningBinary(OwningBinary &&Other)
: … { … }
template <typename T>
OwningBinary<T> &OwningBinary<T>::operator=(OwningBinary &&Other) { … }
template <typename T>
std::pair<std::unique_ptr<T>, std::unique_ptr<MemoryBuffer>>
OwningBinary<T>::takeBinary() { … }
template <typename T> T* OwningBinary<T>::getBinary() { … }
template <typename T> const T* OwningBinary<T>::getBinary() const { … }
Expected<OwningBinary<Binary>> createBinary(StringRef Path,
LLVMContext *Context = nullptr,
bool InitContent = true);
}
}
#endif