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)
69 OS <<
"\n Fixup @" <<
F.getOffset() <<
" Value:";
70 F.getValue()->print(OS,
nullptr);
71 OS <<
" Kind:" <<
F.getKind();
72 if (
F.isLinkerRelaxable())
73 OS <<
" LinkerRelaxable";
86 OS <<
" LinkerRelaxable";
89 OS <<
" Size:" <<
Fixed.size();
91 OS <<
'+' << Var.size();
98 for (
unsigned i = 0, e =
Fixed.size(); i != e; ++i) {
102 for (
unsigned i = 0, e = Var.size(); i != e; ++i) {
103 if (
Fixed.size() || i)
147 OS <<
" Value:" <<
static_cast<unsigned>(FF->getValue())
148 <<
" ValueSize:" <<
static_cast<unsigned>(FF->getValueSize())
150 FF->getNumValues().print(OS,
nullptr);
155 OS <<
" NumBytes:" << NF->getNumBytes()
156 <<
" ControlledNopLength:" << NF->getControlledNopLength();
162 OF->getOffset().print(OS,
nullptr);
163 OS <<
" Value:" <<
static_cast<unsigned>(OF->getValue());
168 OS <<
" BoundarySize:" << BF->getAlignment().value()
169 <<
" LastFragment:" << BF->getLastFragment()
170 <<
" Size:" << BF->getSize();
175 OS <<
" Sym:" <<
F->getSymbol();
180 OS <<
" Sym:" << *
F->getFnStartSym();
186 for (std::pair<const MCSymbol *, const MCSymbol *> RangeStartEnd :
188 OS <<
" RangeStart:" << RangeStartEnd.first;
189 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.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
uint64_t value() const
This is a hole in the type system and should not be abused.