LLVM 20.0.0git
MCXCOFFObjectWriter.h
Go to the documentation of this file.
1//===-- llvm/MC/MCXCOFFObjectWriter.h - XCOFF Object Writer ---------------===//
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_MCXCOFFOBJECTWRITER_H
10#define LLVM_MC_MCXCOFFOBJECTWRITER_H
11
13
14namespace llvm {
15
16class raw_pwrite_stream;
17
19protected:
20 MCXCOFFObjectTargetWriter(bool Is64Bit);
21
22public:
24
26 static bool classof(const MCObjectTargetWriter *W) {
27 return W->getFormat() == Triple::XCOFF;
28 }
29 bool is64Bit() const { return Is64Bit; }
30
31 // Returns relocation info such as type, sign and size.
32 // First element of the pair contains type,
33 // second element contains sign and size.
34 virtual std::pair<uint8_t, uint8_t>
36 bool IsPCRel) const = 0;
37
38private:
39 bool Is64Bit;
40};
41
42std::unique_ptr<MCObjectWriter>
43createXCOFFObjectWriter(std::unique_ptr<MCXCOFFObjectTargetWriter> MOTW,
45
46namespace XCOFF {
47void addExceptionEntry(MCObjectWriter &Writer, const MCSymbol *Symbol,
48 const MCSymbol *Trap, unsigned LanguageCode,
49 unsigned ReasonCode, unsigned FunctionSize,
50 bool hasDebug);
53} // namespace XCOFF
54
55} // end namespace llvm
56
57#endif // LLVM_MC_MCXCOFFOBJECTWRITER_H
std::string Name
PowerPC TLS Dynamic Call Fixup
raw_pwrite_stream & OS
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...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
This represents an "assembler immediate".
Definition: MCValue.h:36
static bool classof(const MCObjectTargetWriter *W)
virtual std::pair< uint8_t, uint8_t > getRelocTypeAndSignSize(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const =0
Triple::ObjectFormatType getFormat() const override
Root of the metadata hierarchy.
Definition: Metadata.h:62
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Target - Wrapper for Target specific information.
ObjectFormatType
Definition: Triple.h:299
An abstract base class for streams implementations that also support a pwrite operation.
Definition: raw_ostream.h:434
void addCInfoSymEntry(MCObjectWriter &Writer, StringRef Name, StringRef Metadata)
void addExceptionEntry(MCObjectWriter &Writer, const MCSymbol *Symbol, const MCSymbol *Trap, unsigned LanguageCode, unsigned ReasonCode, unsigned FunctionSize, bool hasDebug)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::unique_ptr< MCObjectWriter > createXCOFFObjectWriter(std::unique_ptr< MCXCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)