#include "MCTargetDesc/WebAssemblyFixupKinds.h"
#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSectionWasm.h"
#include "llvm/MC/MCSymbolWasm.h"
#include "llvm/MC/MCValue.h"
#include "llvm/MC/MCWasmObjectWriter.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
usingnamespacellvm;
namespace {
class WebAssemblyWasmObjectWriter final : public MCWasmObjectTargetWriter { … };
}
WebAssemblyWasmObjectWriter::WebAssemblyWasmObjectWriter(bool Is64Bit,
bool IsEmscripten)
: … { … }
static const MCSection *getTargetSection(const MCExpr *Expr) { … }
unsigned WebAssemblyWasmObjectWriter::getRelocType(
const MCValue &Target, const MCFixup &Fixup,
const MCSectionWasm &FixupSection, bool IsLocRel) const { … }
std::unique_ptr<MCObjectTargetWriter>
llvm::createWebAssemblyWasmObjectWriter(bool Is64Bit, bool IsEmscripten) { … }