LLVM: include/llvm/MC/MCWinCOFFObjectWriter.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_MC_MCWINCOFFOBJECTWRITER_H
10#define LLVM_MC_MCWINCOFFOBJECTWRITER_H
11
13#include
14
15namespace llvm {
16
22
24 virtual void anchor();
25
26 const unsigned Machine;
27
28protected:
30
31public:
33
38
39 unsigned getMachine() const { return Machine; }
44};
45
46class WinCOFFWriter;
47
50
51 std::unique_ptr TargetObjectWriter;
52 std::unique_ptr ObjWriter, DwoWriter;
53 bool IncrementalLinkerCompatible = false;
54
55public:
60
61
62 void reset() override;
65 IncrementalLinkerCompatible = Value;
66 }
70 bool IsPCRel) const override;
75};
76
77
78
79
80
81
82std::unique_ptr
84 raw_pwrite_stream &OS);
85
86std::unique_ptr
88 raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS);
89}
90
91#endif
PowerPC TLS Dynamic Call Fixup
Generic interface to target specific assembler backends.
Context object for machine code objects.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Base class for classes that define behaviour that is specific to both the target and the object forma...
Instances of this class represent a uniqued identifier for a section in the current translation unit.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
virtual bool recordRelocation(const MCFixup &) const
Definition MCWinCOFFObjectWriter.h:43
MCWinCOFFObjectTargetWriter(unsigned Machine_)
~MCWinCOFFObjectTargetWriter() override=default
static bool classof(const MCObjectTargetWriter *W)
Definition MCWinCOFFObjectWriter.h:35
virtual unsigned getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsCrossSection, const MCAsmBackend &MAB) const =0
unsigned getMachine() const
Definition MCWinCOFFObjectWriter.h:39
Triple::ObjectFormatType getFormat() const override
Definition MCWinCOFFObjectWriter.h:34
Target - Wrapper for Target specific information.
LLVM Value Representation.
void recordRelocation(const MCFragment &F, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue) override
Record a relocation entry.
void reset() override
lifetime management
int getSectionNumber(const MCSection &Section) const
void setAssembler(MCAssembler *Asm) override
WinCOFFObjectWriter(std::unique_ptr< MCWinCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
void executePostLayoutBinding() override
Perform any late binding of symbols (for example, to assign symbol indices for use when generating re...
friend class WinCOFFWriter
Definition MCWinCOFFObjectWriter.h:49
uint64_t writeObject() override
Write the object file and returns the number of bytes written.
void setIncrementalLinkerCompatible(bool Value)
Definition MCWinCOFFObjectWriter.h:64
bool isSymbolRefDifferenceFullyResolvedImpl(const MCSymbol &SymA, const MCFragment &FB, bool InSet, bool IsPCRel) const override
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 > createWinCOFFDwoObjectWriter(std::unique_ptr< MCWinCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS)
std::unique_ptr< MCObjectWriter > createWinCOFFObjectWriter(std::unique_ptr< MCWinCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new Win COFF writer instance.