LLVM 20.0.0git
MCDXContainerWriter.h
Go to the documentation of this file.
1//===- llvm/MC/MCDXContainerWriter.h - DXContainer Writer -*- C++ -------*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_MC_MCDXCONTAINERWRITER_H
10#define LLVM_MC_MCDXCONTAINERWRITER_H
11
13#include "llvm/MC/MCValue.h"
16
17namespace llvm {
18
19class raw_pwrite_stream;
20
22protected:
24
25public:
27
30 }
31 static bool classof(const MCObjectTargetWriter *W) {
32 return W->getFormat() == Triple::DXContainer;
33 }
34};
35
38 std::unique_ptr<MCDXContainerTargetWriter> TargetObjectWriter;
39
40public:
41 DXContainerObjectWriter(std::unique_ptr<MCDXContainerTargetWriter> MOTW,
43 : W(OS, llvm::endianness::little), TargetObjectWriter(std::move(MOTW)) {}
44
45 void recordRelocation(MCAssembler &Asm, const MCFragment *Fragment,
47 uint64_t &FixedValue) override {}
48
49 uint64_t writeObject(MCAssembler &Asm) override;
50};
51} // end namespace llvm
52
53#endif // LLVM_MC_MCDXCONTAINERWRITER_H
PowerPC TLS Dynamic Call Fixup
raw_pwrite_stream & OS
DXContainerObjectWriter(std::unique_ptr< MCDXContainerTargetWriter > MOTW, raw_pwrite_stream &OS)
void recordRelocation(MCAssembler &Asm, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue) override
Record a relocation entry.
uint64_t writeObject(MCAssembler &Asm) override
Write the object file and returns the number of bytes written.
Triple::ObjectFormatType getFormat() const override
static bool classof(const MCObjectTargetWriter *W)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:71
Base class for classes that define behaviour that is specific to both the target and the object forma...
Defines the object file and target independent interfaces used by the assembler backend to write nati...
This represents an "assembler immediate".
Definition: MCValue.h:36
Target - Wrapper for Target specific information.
ObjectFormatType
Definition: Triple.h:307
@ DXContainer
Definition: Triple.h:311
An abstract base class for streams implementations that also support a pwrite operation.
Definition: raw_ostream.h:434
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition: STLExtras.h:1873
endianness
Definition: bit.h:70
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
Adapter to write values to a stream in a particular byte order.
Definition: EndianStream.h:67