22 std::unique_ptr<MCSPIRVObjectTargetWriter> TargetObjectWriter;
25 SPIRVObjectWriter(std::unique_ptr<MCSPIRVObjectTargetWriter> MOTW,
29 ~SPIRVObjectWriter()
override {}
44void SPIRVObjectWriter::writeHeader(
const MCAssembler &Asm) {
51 constexpr uint32_t VersionNumber = 0 | (Major << 16) | (Minor << 8);
53 constexpr uint32_t GeneratorMagicNumber = 0;
70 Asm.writeSectionData(
W.OS, &S, Layout);
71 return W.OS.tell() - StartOffset;
74std::unique_ptr<MCObjectWriter>
77 return std::make_unique<SPIRVObjectWriter>(std::move(MOTW),
OS);
PowerPC TLS Dynamic Call Fixup
Encapsulates the layout of an assembly file at a particular point in time.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Defines the object file and target independent interfaces used by the assembler backend to write nati...
virtual uint64_t writeObject(MCAssembler &Asm, const MCAsmLayout &Layout)=0
Write the object file and returns the number of bytes written.
virtual void executePostLayoutBinding(MCAssembler &Asm, const MCAsmLayout &Layout)=0
Perform any late binding of symbols (for example, to assign symbol indices for use when generating re...
virtual void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue)=0
Record a relocation entry.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
This represents an "assembler immediate".
Target - Wrapper for Target specific information.
An abstract base class for streams implementations that also support a pwrite operation.
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< MCObjectWriter > createSPIRVObjectWriter(std::unique_ptr< MCSPIRVObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new SPIR-V writer instance.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
Adapter to write values to a stream in a particular byte order.