12#include "llvm/Config/llvm-config.h"
27static_assert(std::is_trivially_destructible_v<MCFragment>,
28 "fragment classes must be trivially destructible");
31 : Kind(Kind), LinkerRelaxable(
false), HasInstructions(HasInstructions),
32 AllowAutoPadding(
false) {
33 static_assert(
sizeof(MCFragment::Tail) <= 16,
34 "Keep the variable-size tail small");
41#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
68 OS <<
"\n Fixup @" <<
F.getOffset() <<
" Value:";
69 F.getValue()->print(
OS,
nullptr);
70 OS <<
" Kind:" <<
F.getKind();
71 if (
F.isLinkerRelaxable())
72 OS <<
" LinkerRelaxable";
84 OS <<
" LinkerRelaxable";
89 OS <<
'+' << Var.size();
96 for (
unsigned i = 0, e =
Fixed.size(); i != e; ++i) {
100 for (
unsigned i = 0, e = Var.size(); i != e; ++i) {
101 if (
Fixed.size() || i)
143 const auto *FF = cast<MCFillFragment>(
this);
144 OS <<
" Value:" <<
static_cast<unsigned>(FF->getValue())
145 <<
" ValueSize:" <<
static_cast<unsigned>(FF->getValueSize())
147 FF->getNumValues().print(
OS,
nullptr);
151 const auto *NF = cast<MCNopsFragment>(
this);
152 OS <<
" NumBytes:" << NF->getNumBytes()
153 <<
" ControlledNopLength:" << NF->getControlledNopLength();
157 const auto *OF = cast<MCOrgFragment>(
this);
159 OF->getOffset().print(
OS,
nullptr);
160 OS <<
" Value:" <<
static_cast<unsigned>(OF->getValue());
164 const auto *BF = cast<MCBoundaryAlignFragment>(
this);
165 OS <<
" BoundarySize:" << BF->getAlignment().value()
166 <<
" LastFragment:" << BF->getLastFragment()
167 <<
" Size:" << BF->getSize();
171 const auto *
F = cast<MCSymbolIdFragment>(
this);
172 OS <<
" Sym:" <<
F->getSymbol();
176 const auto *
F = cast<MCCVInlineLineTableFragment>(
this);
177 OS <<
" Sym:" << *
F->getFnStartSym();
181 const auto *
F = cast<MCCVDefRangeFragment>(
this);
183 for (std::pair<const MCSymbol *, const MCSymbol *> RangeStartEnd :
185 OS <<
" RangeStart:" << RangeStartEnd.first;
186 OS <<
" RangeEnd:" << RangeStartEnd.second;
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
const MCExpr & getDwarfAddrDelta() const
MutableArrayRef< char > getContents()
FragmentType getKind() const
bool isLinkerRelaxable() const
LLVM_ABI MCFragment(FragmentType Kind=MCFragment::FT_Data, bool HasInstructions=false)
bool hasAlignEmitNops() const
LLVM_ABI const MCSymbol * getAtom() const
unsigned getAlignMaxBytesToEmit() const
int64_t getDwarfLineDelta() const
MutableArrayRef< MCFixup > getFixups()
const MCExpr & getLEBValue() const
LLVM_ABI void dump() const
Align getAlignment() const
int64_t getAlignFill() const
uint8_t getAlignFillLen() const
MutableArrayRef< char > getVarContents()
MutableArrayRef< MCFixup > getVarFixups()
LLVM_ABI void dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer=nullptr, StringRef Separator=" ", const MCContext *Ctx=nullptr) const
Dump the MCInst as prettily as possible using the additional MC structures, if given.
This represents a section on a Mach-O system (used by Mac OS X).
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
auto enumerate(FirstRange &&First, RestRanges &&...Rest)
Given two or more input ranges, returns a new range whose values are tuples (A, B,...
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
LLVM_ABI raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
uint64_t value() const
This is a hole in the type system and should not be abused.