LLVM: lib/MC/MCStreamer.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

38#include

39#include

40#include

41#include

42#include

43

44using namespace llvm;

45

48}

49

50

52

54

56

58

64 Subsection);

65}

66

69}

70

74

77}

78

82 for (const unsigned char C : Data.bytes()) {

85

88 }

89}

90

92

94 : Context(Ctx), CurrentWinFrameInfo(nullptr),

95 CurrentProcWinFrameInfoStartIndex(0) {

96 SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());

97}

98

100

102 DwarfFrameInfos.clear();

103 CurrentWinFrameInfo = nullptr;

104 WinFrameInfos.clear();

105 SectionStack.clear();

106 SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());

108}

109

111

113}

114

117 return DwarfFrameInfos;

118}

119

121

124

126 for (auto &FI : DwarfFrameInfos)

127 FI.CompactUnwindEncoding =

129}

130

131

132

136 "Invalid size");

140 unsigned Index = IsLittleEndian ? 0 : 8 - Size;

142}

144 if (Value.getNumWords() == 1) {

146 return;

147 }

148

151 const APInt Swapped = ShouldSwap ? Value.byteSwap() : Value;

152 const unsigned Size = Value.getBitWidth() / 8;

157}

158

159

160

166 return Tmp.size();

167}

168

169

170

176 return Tmp.size();

177}

178

181}

182

184 bool IsSectionRelative) {

185 assert((!IsSectionRelative || Size == 4) &&

186 "SectionRelative value requires 4-bytes");

187

188 if (!IsSectionRelative)

190 else

192}

193

196}

197

200}

201

204}

205

208}

209

212}

213

216}

217

218

219

221 if (NumBytes)

223}

224

227

228

230

233 std::optionalMD5::MD5Result Checksum, std::optional Source,

234 unsigned CUID) {

236 Source, CUID);

237}

238

241 std::optionalMD5::MD5Result Checksum,

242 std::optional Source,

243 unsigned CUID) {

245 Source);

246}

247

250 if (!CurFrame)

251 return;

253}

254

257 if (!CurFrame)

258 return;

260}

261

263 unsigned Column, unsigned Flags,

264 unsigned Isa, unsigned Discriminator,

267 Discriminator);

268}

269

274}

275

282 }

284}

285

287 return !FrameInfoStack.empty();

288}

289

293 "this directive must appear between "

294 ".cfi_startproc and .cfi_endproc directives");

295 return nullptr;

296 }

297 return &DwarfFrameInfos[FrameInfoStack.back().first];

298}

299

302 unsigned ChecksumKind) {

304 ChecksumKind);

305}

306

309}

310

312 unsigned IAFunc, unsigned IAFile,

313 unsigned IALine, unsigned IACol,

315 if (getContext().getCVContext().getCVFunctionInfo(IAFunc) == nullptr) {

317 ".cv_func_id or .cv_inline_site_id");

318 return true;

319 }

320

322 FunctionId, IAFunc, IAFile, IALine, IACol);

323}

324

326 unsigned Line, unsigned Column,

327 bool PrologueEnd, bool IsStmt,

329

334 if (!FI) {

336 Loc, "function id not introduced by .cv_func_id or .cv_inline_site_id");

337 return false;

338 }

339

340

341 if (FI->Section == nullptr)

345 Loc,

346 "all .cv_loc directives for a function must be in the same section");

347 return false;

348 }

349 return true;

350}

351

355

357 unsigned SourceFileId,

358 unsigned SourceLineNum,

361

362

363

364template

367 const T &DefRangeHeader) {

368 BytePrefix.resize(2 + sizeof(T));

369 codeview::ulittle16_t SymKindLE = codeview::ulittle16_t(SymKind);

370 memcpy(&BytePrefix[0], &SymKindLE, 2);

371 memcpy(&BytePrefix[2], &DefRangeHeader, sizeof(T));

372}

373

375 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,

377

379 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,

384}

385

387 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,

391 DRHdr);

393}

394

396 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,

401}

402

404 ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,

408 DRHdr);

410}

411

414}

415

418}

419

421 Symbol->redefineIfPossible();

422

423 if (!Symbol->isUndefined() || Symbol->isVariable())

425 "' is already defined");

426

427 assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");

429 assert(!Symbol->getFragment() && "Unexpected fragment on symbol data!");

430 assert(Symbol->isUndefined() && "Cannot define a symbol twice!");

431

433

435 if (TS)

437}

438

441

443

445 if (!FrameInfoStack.empty() &&

448 Loc, "starting new .cfi frame before finishing the previous one");

449

453

455 if (MAI) {

461 }

462 }

463 }

464

466 DwarfFrameInfos.push_back(std::move(Frame));

467}

468

470}

471

474 if (!CurFrame)

475 return;

477 FrameInfoStack.pop_back();

478}

479

481

482

484}

485

487

489

491 MCDwarfLineEntry LabelLineEntry(nullptr, DwarfLoc, LineStreamLabel);

496

497 return LineStreamLabel;

498}

499

501

502

504}

505

511 if (!CurFrame)

512 return;

515}

516

522 if (!CurFrame)

523 return;

525}

526

532 if (!CurFrame)

533 return;

535}

536

542 if (!CurFrame)

543 return;

546}

547

554 if (!CurFrame)

555 return;

558}

559

565 if (!CurFrame)

566 return;

568}

569

575 if (!CurFrame)

576 return;

578}

579

581 unsigned Encoding) {

583 if (!CurFrame)

584 return;

587}

588

591 if (!CurFrame)

592 return;

595}

596

602 if (!CurFrame)

603 return;

605}

606

608

613 if (!CurFrame)

614 return;

616}

617

623 if (!CurFrame)

624 return;

626}

627

633 if (!CurFrame)

634 return;

636}

637

643 if (!CurFrame)

644 return;

646}

647

653 if (!CurFrame)

654 return;

656}

657

660 if (!CurFrame)

661 return;

663}

664

670 if (!CurFrame)

671 return;

673}

674

681 if (!CurFrame)

682 return;

684}

685

690 if (!CurFrame)

691 return;

693}

694

700 if (!CurFrame)

701 return;

703}

704

710 if (!CurFrame)

711 return;

713}

714

717 if (!CurFrame)

718 return;

720}

721

727}

728

734 if (!CurFrame)

735 return;

737}

738

743 Loc, ".seh_* directives are not supported on this target");

744 return nullptr;

745 }

746 if (!CurrentWinFrameInfo || CurrentWinFrameInfo->End) {

748 Loc, ".seh_ directive must appear within an active frame");

749 return nullptr;

750 }

751 return CurrentWinFrameInfo;

752}

753

758 Loc, ".seh_* directives are not supported on this target");

759 if (CurrentWinFrameInfo && !CurrentWinFrameInfo->End)

761 Loc, "Starting a function before ending the previous one!");

762

764

765 CurrentProcWinFrameInfoStartIndex = WinFrameInfos.size();

766 WinFrameInfos.emplace_back(

767 std::make_uniqueWinEH::FrameInfo(Symbol, StartProc));

768 CurrentWinFrameInfo = WinFrameInfos.back().get();

770}

771

774 if (!CurFrame)

775 return;

778

780 CurFrame->End = Label;

783

784 for (size_t I = CurrentProcWinFrameInfoStartIndex, E = WinFrameInfos.size();

785 I != E; ++I)

788}

789

792 if (!CurFrame)

793 return;

796

799}

803 if (!CurFrame)

804 return;

805

807

808 WinFrameInfos.emplace_back(std::make_uniqueWinEH::FrameInfo(

809 CurFrame->Function, StartProc, CurFrame));

810 CurrentWinFrameInfo = WinFrameInfos.back().get();

812}

813

816 if (!CurFrame)

817 return;

820 Loc, "End of a chained region outside a chained region!");

821

823

824 CurFrame->End = Label;

826}

827

831 if (!CurFrame)

832 return;

835 Loc, "Chained unwind areas can't have handlers!");

837 if (!Except && !Unwind)

839 if (Unwind)

841 if (Except)

843}

844

847 if (!CurFrame)

848 return;

851}

852

855}

856

860

862 return MainCFISec;

863

864 const auto *TextSecCOFF = cast(TextSec);

865 auto *MainCFISecCOFF = cast(MainCFISec);

866 unsigned UniqueID = TextSecCOFF->getOrAssignWinCFISectionID(NextWinCFIID);

867

868

869

870 const MCSymbol *KeySym = nullptr;

872 KeySym = TextSecCOFF->getCOMDATSymbol();

873

874

875

876

878 std::string SectionName = (MainCFISecCOFF->getName() + "$" +

879 TextSecCOFF->getName().split('$').second)

880 .str();

882 MainCFISecCOFF->getCharacteristics() |

885 }

886 }

887

889}

890

893 getContext().getObjectFileInfo()->getPDataSection(),

894 TextSec);

895}

896

899 getContext().getObjectFileInfo()->getXDataSection(),

900 TextSec);

901}

902

904

907}

908

911 if (!CurFrame)

912 return;

913

915

919}

920

924 if (!CurFrame)

925 return;

928 Loc, "frame register and offset can be set at most once");

933 Loc, "frame offset must be less than or equal to 240");

934

936

941}

942

945 if (!CurFrame)

946 return;

947 if (Size == 0)

949 "stack allocation size must be non-zero");

950 if (Size & 7)

952 Loc, "stack allocation size is not a multiple of 8");

953

955

958}

959

963 if (!CurFrame)

964 return;

965

968 Loc, "register save offset is not 8 byte aligned");

969

971

975}

976

980 if (!CurFrame)

981 return;

984

986

990}

991

994 if (!CurFrame)

995 return;

998 Loc, "If present, PushMachFrame must be the first UOP");

999

1001

1004}

1005

1008 if (!CurFrame)

1009 return;

1010

1012

1014}

1015

1017

1019

1021

1023

1025

1027

1029

1030

1031

1032

1034

1035

1036

1037 report_fatal_error("EmitRawText called on an MCStreamer that doesn't support "

1038 "it (target backend is likely missing an AsmStreamer "

1039 "implementation)");

1040}

1041

1045}

1046

1048

1050

1052 if ((!DwarfFrameInfos.empty() && !DwarfFrameInfos.back().End) ||

1053 (!WinFrameInfos.empty() && !WinFrameInfos.back()->End)) {

1055 return;

1056 }

1057

1059 if (TS)

1061

1063}

1064

1067 return;

1070}

1071

1078}

1079

1081 const Twine &Comment) {

1086

1089

1091

1092 return Hi;

1093}

1094

1096

1098}

1099

1102 Symbol->setVariableValue(Value);

1103

1105 if (TS)

1107}

1108

1114}

1115

1117}

1118

1120 switch (Expr.getKind()) {

1122 cast(Expr).visitUsedExpr(*this);

1123 break;

1124

1126 break;

1127

1129 const MCBinaryExpr &BE = cast(Expr);

1132 break;

1133 }

1134

1136 visitUsedSymbol(cast(Expr).getSymbol());

1137 break;

1138

1140 visitUsedExpr(*cast(Expr).getSubExpr());

1141 break;

1142 }

1143}

1144

1146

1150}

1151

1157

1158

1160

1161

1163

1164

1166

1167

1169 FnSym, Probe, InlineStack);

1170}

1171

1173 unsigned Size) {

1174

1175 const MCExpr *Diff =

1178

1182 return;

1183 }

1184

1185

1189}

1190

1193

1194 const MCExpr *Diff =

1197

1199}

1200

1205 llvm_unreachable("this directive only supported on COFF targets");

1206}

1208 llvm_unreachable("this directive only supported on COFF targets");

1209}

1214}

1216 llvm_unreachable("this directive only supported on COFF targets");

1217}

1219 llvm_unreachable("this directive only supported on COFF targets");

1220}

1223 Align Alignment) {

1224 llvm_unreachable("this directive only supported on XCOFF targets");

1225}

1226

1230 llvm_unreachable("emitXCOFFSymbolLinkageWithVisibility is only supported on "

1231 "XCOFF targets");

1232}

1233

1236

1238 llvm_unreachable("emitXCOFFRefDirective is only supported on XCOFF targets");

1239}

1240

1243 unsigned Lang, unsigned Reason,

1244 unsigned FunctionSize,

1245 bool hasDebug) {

1247 "XCOFF targets");

1248}

1249

1252 "XCOFF targets");

1253}

1254

1259 Align ByteAlignment) {}

1263 CurFrag = &Section->getDummyFragment();

1264}

1270}

1277 unsigned ValueSize,

1278 unsigned MaxBytesToEmit) {}

1280 unsigned MaxBytesToEmit) {}

1287

1289 if (SectionStack.size() <= 1)

1290 return false;

1291 auto I = SectionStack.end();

1292 --I;

1294 --I;

1296

1297 if (NewSec.first && OldSec != NewSec)

1300 return true;

1301}

1302

1304 assert(Section && "Cannot switch to a null section!");

1306 SectionStack.back().second = curSection;

1310 assert(!Section->hasEnded() && "Section already ended");

1311 MCSymbol *Sym = Section->getBeginSymbol();

1312 if (Sym && Sym->isInSection())

1314 }

1315}

1316

1318 int64_t Subsec = 0;

1319 if (SubsecExpr) {

1320 if (!SubsecExpr->evaluateAsAbsolute(Subsec, getAssemblerPtr())) {

1322 "cannot evaluate subsection number");

1323 return true;

1324 }

1325 if (!isUInt<31>(Subsec)) {

1327 "subsection number " + Twine(Subsec) +

1328 " is not within [0,2147483647]");

1329 return true;

1330 }

1331 }

1333 return false;

1334}

1335

1337 SectionStack.back().second = SectionStack.back().first;

1340 MCSymbol *Sym = Section->getBeginSymbol();

1341 if (Sym && Sym->isInSection())

1343}

1344

1346

1347

1348 MCSymbol *Sym = Section->getEndSymbol(Context);

1349 if (Sym->isInSection())

1350 return Sym;

1351

1354 return Sym;

1355}

1356

1361 return !Min.empty() && Min > TargetVersion ? Min : TargetVersion;

1362}

1363

1366 assert(Target.isOSDarwin() && "expected a darwin OS");

1367 switch (Target.getOS()) {

1372 assert(Target.isMacCatalystEnvironment() &&

1373 "mac Catalyst should use LC_BUILD_VERSION");

1379 default:

1380 break;

1381 }

1383}

1384

1386 assert(Target.isOSDarwin() && "expected a darwin OS");

1387 switch (Target.getOS()) {

1392

1393 if (Target.isMacCatalystEnvironment())

1395 [[fallthrough]];

1401

1404

1406 default:

1407 break;

1408 }

1410}

1411

1414 assert(Target.isOSDarwin() && "expected a darwin OS");

1415 switch (Target.getOS()) {

1418 return MachO::PLATFORM_MACOS;

1420 if (Target.isMacCatalystEnvironment())

1421 return MachO::PLATFORM_MACCATALYST;

1422 return Target.isSimulatorEnvironment() ? MachO::PLATFORM_IOSSIMULATOR

1423 : MachO::PLATFORM_IOS;

1425 return Target.isSimulatorEnvironment() ? MachO::PLATFORM_TVOSSIMULATOR

1426 : MachO::PLATFORM_TVOS;

1428 return Target.isSimulatorEnvironment() ? MachO::PLATFORM_WATCHOSSIMULATOR

1429 : MachO::PLATFORM_WATCHOS;

1431 return MachO::PLATFORM_DRIVERKIT;

1433 return Target.isSimulatorEnvironment() ? MachO::PLATFORM_XROS_SIMULATOR

1434 : MachO::PLATFORM_XROS;

1435 default:

1436 break;

1437 }

1439}

1440

1443 const Triple *DarwinTargetVariantTriple,

1444 const VersionTuple &DarwinTargetVariantSDKVersion) {

1445 if (Target.isOSBinFormatMachO() || Target.isOSDarwin())

1446 return;

1447

1448 if (Target.getOSMajorVersion() == 0)

1449 return;

1450

1452 switch (Target.getOS()) {

1456 break;

1460 break;

1463 break;

1466 break;

1469 break;

1470 default:

1472 }

1473 assert(Version.getMajor() != 0 && "A non-zero major version is expected");

1474 auto LinkedTargetVersion =

1477 bool ShouldEmitBuildVersion = false;

1478 if (BuildVersionOSVersion.empty() ||

1479 LinkedTargetVersion >= BuildVersionOSVersion) {

1480 if (Target.isMacCatalystEnvironment() && DarwinTargetVariantTriple &&

1481 DarwinTargetVariantTriple->isMacOSX()) {

1483 DarwinTargetVariantSDKVersion,

1484 nullptr,

1485 VersionTuple());

1488 LinkedTargetVersion.getMajor(),

1489 LinkedTargetVersion.getMinor().value_or(0),

1490 LinkedTargetVersion.getSubminor().value_or(0), SDKVersion);

1491 return;

1492 }

1494 LinkedTargetVersion.getMajor(),

1495 LinkedTargetVersion.getMinor().value_or(0),

1496 LinkedTargetVersion.getSubminor().value_or(0), SDKVersion);

1497 ShouldEmitBuildVersion = true;

1498 }

1499

1500 if (const Triple *TVT = DarwinTargetVariantTriple) {

1501 if (Target.isMacOSX() && TVT->isMacCatalystEnvironment()) {

1502 auto TVLinkedTargetVersion =

1506 TVLinkedTargetVersion.getMajor(),

1507 TVLinkedTargetVersion.getMinor().value_or(0),

1508 TVLinkedTargetVersion.getSubminor().value_or(0),

1509 DarwinTargetVariantSDKVersion);

1510 }

1511 }

1512

1513 if (ShouldEmitBuildVersion)

1514 return;

1515

1517 LinkedTargetVersion.getMajor(),

1518 LinkedTargetVersion.getMinor().value_or(0),

1519 LinkedTargetVersion.getSubminor().value_or(0), SDKVersion);

1520}

BlockVerifier::State From

static ManagedStatic< cl::opt< bool, true >, CreateDebug > Debug

static VersionTuple getMachoBuildVersionSupportedOS(const Triple &Target)

static void copyBytesForDefRange(SmallString< 20 > &BytePrefix, codeview::SymbolKind SymKind, const T &DefRangeHeader)

Only call this on endian-specific types like ulittle16_t and little32_t, or structs composed of them.

static MCVersionMinType getMachoVersionMinLoadCommandType(const Triple &Target)

static VersionTuple targetVersionOrMinimumSupportedOSVersion(const Triple &Target, VersionTuple TargetVersion)

static MCSection * getWinCFISection(MCContext &Context, unsigned *NextWinCFIID, MCSection *MainCFISec, const MCSection *TextSec)

static MachO::PlatformType getMachoBuildVersionPlatformType(const Triple &Target)

static unsigned encodeSEHRegNum(MCContext &Ctx, MCRegister Reg)

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

This file defines the SmallString class.

Class for arbitrary precision integers.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Holds state from .cv_file and .cv_loc directives for later emission.

bool addFile(MCStreamer &OS, unsigned FileNumber, StringRef Filename, ArrayRef< uint8_t > ChecksumBytes, uint8_t ChecksumKind)

MCCVFunctionInfo * getCVFunctionInfo(unsigned FuncId)

Retreive the function info if this is a valid function id, or nullptr.

bool recordFunctionId(unsigned FuncId)

Records the function id of a normal function.

bool recordInlinedCallSiteId(unsigned FuncId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol)

Records the function id of an inlined call site.

Tagged union holding either a T or a Error.

Generic interface to target specific assembler backends.

virtual uint64_t generateCompactUnwindEncoding(const MCDwarfFrameInfo *FI, const MCContext *Ctxt) const

Generate the compact unwind encoding for the CFI instructions.

This class is intended to be used as a base class for asm properties and features specific to the tar...

StringRef getPrivateGlobalPrefix() const

bool hasCOFFAssociativeComdats() const

bool isLittleEndian() const

True if the target is little endian.

const std::vector< MCCFIInstruction > & getInitialFrameState() const

const char * getData8bitsDirective() const

bool doesSetDirectiveSuppressReloc() const

bool usesWindowsCFI() const

Binary assembler expressions.

const MCExpr * getLHS() const

Get the left-hand side expression of the binary operator.

const MCExpr * getRHS() const

Get the right-hand side expression of the binary operator.

static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)

static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register, SMLoc Loc={})

.cfi_def_cfa_register modifies a rule for computing CFA.

static MCCFIInstruction createUndefined(MCSymbol *L, unsigned Register, SMLoc Loc={})

.cfi_undefined From now on the previous value of Register can't be restored anymore.

static MCCFIInstruction createGnuArgsSize(MCSymbol *L, int64_t Size, SMLoc Loc={})

A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE.

static MCCFIInstruction createRestore(MCSymbol *L, unsigned Register, SMLoc Loc={})

.cfi_restore says that the rule for Register is now the same as it was at the beginning of the functi...

static MCCFIInstruction createLLVMDefAspaceCfa(MCSymbol *L, unsigned Register, int64_t Offset, unsigned AddressSpace, SMLoc Loc)

.cfi_llvm_def_aspace_cfa defines the rule for computing the CFA to be the result of evaluating the DW...

static MCCFIInstruction createRegister(MCSymbol *L, unsigned Register1, unsigned Register2, SMLoc Loc={})

.cfi_register Previous value of Register1 is saved in register Register2.

static MCCFIInstruction cfiDefCfa(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})

.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it.

static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})

.cfi_offset Previous value of Register is saved at offset Offset from CFA.

static MCCFIInstruction createValOffset(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})

.cfi_val_offset Previous value of Register is offset Offset from the current CFA register.

static MCCFIInstruction createNegateRAStateWithPC(MCSymbol *L, SMLoc Loc={})

.cfi_negate_ra_state_with_pc AArch64 negate RA state with PC.

static MCCFIInstruction createNegateRAState(MCSymbol *L, SMLoc Loc={})

.cfi_negate_ra_state AArch64 negate RA state.

static MCCFIInstruction createRememberState(MCSymbol *L, SMLoc Loc={})

.cfi_remember_state Save all current rules for all registers.

static MCCFIInstruction cfiDefCfaOffset(MCSymbol *L, int64_t Offset, SMLoc Loc={})

.cfi_def_cfa_offset modifies a rule for computing CFA.

static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals, SMLoc Loc={}, StringRef Comment="")

.cfi_escape Allows the user to add arbitrary bytes to the unwind info.

static MCCFIInstruction createWindowSave(MCSymbol *L, SMLoc Loc={})

.cfi_window_save SPARC register window is saved.

static MCCFIInstruction createAdjustCfaOffset(MCSymbol *L, int64_t Adjustment, SMLoc Loc={})

.cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subt...

static MCCFIInstruction createRestoreState(MCSymbol *L, SMLoc Loc={})

.cfi_restore_state Restore the previously saved state.

static MCCFIInstruction createSameValue(MCSymbol *L, unsigned Register, SMLoc Loc={})

.cfi_same_value Current value of Register is the same as in the previous frame.

static MCCFIInstruction createRelOffset(MCSymbol *L, unsigned Register, int64_t Offset, SMLoc Loc={})

.cfi_rel_offset Previous value of Register is saved at offset Offset from the current CFA register.

static MCCFIInstruction createLabel(MCSymbol *L, MCSymbol *CfiLabel, SMLoc Loc)

static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)

Context object for machine code objects.

MCPseudoProbeTable & getMCPseudoProbeTable()

const MCObjectFileInfo * getObjectFileInfo() const

MCSymbol * createTempSymbol()

Create a temporary symbol with a unique name.

Expected< unsigned > getDwarfFile(StringRef Directory, StringRef FileName, unsigned FileNumber, std::optional< MD5::MD5Result > Checksum, std::optional< StringRef > Source, unsigned CUID)

Creates an entry in the dwarf file and directory tables.

MCDwarfLineTable & getMCDwarfLineTable(unsigned CUID)

MCSectionCOFF * getCOFFSection(StringRef Section, unsigned Characteristics, StringRef COMDATSymName, int Selection, unsigned UniqueID=GenericSectionID)

CodeViewContext & getCVContext()

const MCRegisterInfo * getRegisterInfo() const

void setCurrentDwarfLoc(unsigned FileNum, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator)

Saves the information from the currently parsed dwarf .loc directive and sets DwarfLocSeen.

const MCAsmInfo * getAsmInfo() const

void reportError(SMLoc L, const Twine &Msg)

MCSymbol * getOrCreateSymbol(const Twine &Name)

Lookup the symbol inside with the specified Name.

const MCDwarfLoc & getCurrentDwarfLoc()

dwarf::DwarfFormat getDwarfFormat() const

MCSectionCOFF * getAssociativeCOFFSection(MCSectionCOFF *Sec, const MCSymbol *KeySym, unsigned UniqueID=GenericSectionID)

Gets or creates a section equivalent to Sec that is associated with the section containing KeySym.

void setMCLineTableRootFile(unsigned CUID, StringRef CompilationDir, StringRef Filename, std::optional< MD5::MD5Result > Checksum, std::optional< StringRef > Source)

Specifies the "root" file and directory of the compilation unit.

const Triple & getTargetTriple() const

Instances of this class represent the line information for the dwarf line table entries.

void setLabel(MCSymbol *Label)

void endCurrentSeqAndEmitLineStreamLabel(MCStreamer *MCOS, SMLoc DefLoc, StringRef Name)

const MCLineSection & getMCLineSections() const

MCSymbol * getLabel() const

Instances of this class represent the information from a dwarf .loc directive.

Base class for the full range of assembler expressions which are needed for parsing.

@ Unary

Unary expressions.

@ Constant

Constant expressions.

@ SymbolRef

References to labels and assigned expressions.

@ Target

Target specific expression.

@ Binary

Binary expressions.

This is an instance of a target assembly language printer that converts an MCInst to valid target ass...

virtual void printInst(const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &OS)=0

Print the specified MCInst to the specified raw_ostream.

Instances of this class represent a single low-level machine instruction.

unsigned getNumOperands() const

const MCOperand & getOperand(unsigned i) const

void addLineEntry(const MCDwarfLineEntry &LineEntry, MCSection *Sec)

MCSection * getTextSection() const

const MCExpr * getExpr() const

void addPseudoProbe(MCSymbol *FuncSym, const MCPseudoProbe &Probe, const MCPseudoProbeInlineStack &InlineStack)

MCPseudoProbeSections & getProbeSections()

Instances of this class represent a pseudo probe instance for a pseudo probe table entry,...

int getSEHRegNum(MCRegister RegNum) const

Map a target register to an equivalent SEH register number.

Wrapper class representing physical registers. Should be passed by value.

Instances of this class represent a uniqued identifier for a section in the current translation unit.

Streaming machine code generation interface.

virtual void emitCFIGnuArgsSize(int64_t Size, SMLoc Loc={})

virtual void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc, const MCSubtargetInfo &STI)

MCSymbol * emitLineTableLabel()

virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)

Emit an assignment of Value to Symbol.

virtual void switchSectionNoPrint(MCSection *Section)

Similar to switchSection, but does not print the section directive.

virtual void emitCFIDefCfa(int64_t Register, int64_t Offset, SMLoc Loc={})

virtual void visitUsedSymbol(const MCSymbol &Sym)

void emitCFIStartProc(bool IsSimple, SMLoc Loc=SMLoc())

virtual bool emitCVFuncIdDirective(unsigned FunctionId)

Introduces a function id for use with .cv_loc.

virtual void finishImpl()

Streamer specific finalization.

virtual void emitDTPRel64Value(const MCExpr *Value)

Emit the expression Value into the output as a dtprel (64-bit DTP relative) value.

virtual void emitCFIBKeyFrame()

void generateCompactUnwindEncodings(MCAsmBackend *MAB)

virtual void beginCOFFSymbolDef(const MCSymbol *Symbol)

Start emitting COFF symbol definition.

virtual void emitSyntaxDirective()

virtual void emitWinCFIPushReg(MCRegister Register, SMLoc Loc=SMLoc())

virtual void emitBinaryData(StringRef Data)

Functionally identical to EmitBytes.

virtual void initSections(bool NoExecStack, const MCSubtargetInfo &STI)

Create the default sections and set the initial one.

virtual bool popSection()

Restore the current and previous section from the section stack.

virtual MCSymbol * emitCFILabel()

When emitting an object file, create and emit a real label.

virtual void emitWindowsUnwindTables()

virtual raw_ostream & getCommentOS()

Return a raw_ostream that comments can be written to.

virtual void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc=SMLoc())

virtual void emitBundleLock(bool AlignToEnd)

The following instructions are a bundle-locked group.

MCSection * getAssociatedPDataSection(const MCSection *TextSec)

Get the .pdata section used for the given section.

virtual void emitDwarfLocLabelDirective(SMLoc Loc, StringRef Name)

This implements the '.loc_label Name' directive.

bool hasUnfinishedDwarfFrameInfo()

virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)

Emit the given Instruction into the current section.

virtual void emitCFINegateRAStateWithPC(SMLoc Loc={})

virtual void emitGPRel64Value(const MCExpr *Value)

Emit the expression Value into the output as a gprel64 (64-bit GP relative) value.

virtual void emitCFISameValue(int64_t Register, SMLoc Loc={})

virtual bool emitCVFileDirective(unsigned FileNo, StringRef Filename, ArrayRef< uint8_t > Checksum, unsigned ChecksumKind)

Associate a filename with a specified logical file number, and also specify that file's checksum info...

virtual void emitCFIReturnColumn(int64_t Register)

virtual void emitCOFFSymbolType(int Type)

Emit the type of the symbol.

virtual void emitCFIPersonality(const MCSymbol *Sym, unsigned Encoding)

virtual void emitDwarfUnitLength(uint64_t Length, const Twine &Comment)

Emit a unit length field.

virtual void emitCFIWindowSave(SMLoc Loc={})

virtual void emitCOFFSymbolIndex(MCSymbol const *Symbol)

Emits the symbol table index of a Symbol into the current section.

virtual void emitDwarfLocDirective(unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName)

This implements the DWARF2 '.loc fileno lineno ...' assembler directive.

virtual void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset)

Emits a COFF image relative relocation.

virtual void endCOFFSymbolDef()

Marks the end of the symbol definition.

virtual void emitWinCFIPushFrame(bool Code, SMLoc Loc=SMLoc())

virtual void emitWinEHHandlerData(SMLoc Loc=SMLoc())

virtual MCAssembler * getAssemblerPtr()

virtual void emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi, const MCSymbol *Lo)

Emit the absolute difference between two symbols encoded with ULEB128.

virtual void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage, MCSymbolAttr Visibility)

Emit a symbol's linkage and visibility with a linkage directive for XCOFF.

virtual void emitCFIUndefined(int64_t Register, SMLoc Loc={})

void setTargetStreamer(MCTargetStreamer *TS)

virtual void emitWinCFISaveXMM(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())

virtual void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame)

virtual void emitCOFFSecNumber(MCSymbol const *Symbol)

Emits the physical number of the section containing the given symbol as assigned during object writin...

virtual void emitCFINegateRAState(SMLoc Loc={})

virtual void emitGPRel32Value(const MCExpr *Value)

Emit the expression Value into the output as a gprel32 (32-bit GP relative) value.

virtual void emitCFILsda(const MCSymbol *Sym, unsigned Encoding)

MCContext & getContext() const

SMLoc getStartTokLoc() const

virtual void emitBundleUnlock()

Ends a bundle-locked group.

virtual Expected< unsigned > tryEmitDwarfFileDirective(unsigned FileNo, StringRef Directory, StringRef Filename, std::optional< MD5::MD5Result > Checksum=std::nullopt, std::optional< StringRef > Source=std::nullopt, unsigned CUID=0)

Associate a filename with a specified logical file number.

virtual void addExplicitComment(const Twine &T)

Add explicit comment T.

virtual void AddComment(const Twine &T, bool EOL=true)

Add a textual comment.

virtual void emitELFSize(MCSymbol *Symbol, const MCExpr *Value)

Emit an ELF .size directive.

virtual void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size, MCSymbol *CsectSym, Align Alignment)

Emits an lcomm directive with XCOFF csect information.

virtual void emitCFIMTETaggedFrame()

virtual void emitTPRel32Value(const MCExpr *Value)

Emit the expression Value into the output as a tprel (32-bit TP relative) value.

virtual void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset)

Emits a COFF section relative relocation.

MCSection * getAssociatedXDataSection(const MCSection *TextSec)

Get the .xdata section used for the given section.

virtual void emitRawComment(const Twine &T, bool TabPrefix=true)

Print T and prefix it with the comment string (normally #) and optionally a tab.

virtual void emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc=SMLoc())

void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())

void emitSymbolValue(const MCSymbol *Sym, unsigned Size, bool IsSectionRelative=false)

Special case of EmitValue that avoids the client having to pass in a MCExpr for MCSymbols.

bool checkCVLocSection(unsigned FuncId, unsigned FileNo, SMLoc Loc)

Returns true if the .cv_loc directive is in the right section.

virtual void emitDwarfLineStartLabel(MCSymbol *StartSym)

Emit the debug line start label.

virtual void emitCFIEscape(StringRef Values, SMLoc Loc={})

virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size)

Emit the absolute difference between two symbols.

virtual void emitXCOFFExceptDirective(const MCSymbol *Symbol, const MCSymbol *Trap, unsigned Lang, unsigned Reason, unsigned FunctionSize, bool hasDebug)

Emit an XCOFF .except directive which adds information about a trap instruction to the object file ex...

virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())

Emit a label for Symbol into the current section.

virtual void emitCOFFSectionIndex(MCSymbol const *Symbol)

Emits a COFF section index.

virtual void emitCFIRememberState(SMLoc Loc)

virtual void reset()

State management.

virtual void emitCFILabelDirective(SMLoc Loc, StringRef Name)

virtual void emitCVLinetableDirective(unsigned FunctionId, const MCSymbol *FnStart, const MCSymbol *FnEnd)

This implements the CodeView '.cv_linetable' assembler directive.

virtual void emitTPRel64Value(const MCExpr *Value)

Emit the expression Value into the output as a tprel (64-bit TP relative) value.

virtual void emitCFISections(bool EH, bool Debug)

virtual void emitCOFFSecOffset(MCSymbol const *Symbol)

Emits the offset of the symbol from the beginning of the section during object writing (i....

MCTargetStreamer * getTargetStreamer()

MCStreamer(MCContext &Ctx)

virtual void emitAssemblerFlag(MCAssemblerFlag Flag)

Note in the output the specified Flag.

virtual void emitDarwinTargetVariantBuildVersion(unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)

virtual void emitValueToAlignment(Align Alignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)

Emit some number of copies of Value until the byte alignment ByteAlignment is reached.

virtual void emitIntValue(uint64_t Value, unsigned Size)

Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.

unsigned getNumFrameInfos()

virtual void emitWinCFISaveReg(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())

virtual void emitWinCFIEndChained(SMLoc Loc=SMLoc())

virtual void emitWinCFIEndProlog(SMLoc Loc=SMLoc())

virtual void emitWinCFIEndProc(SMLoc Loc=SMLoc())

void emitVersionForTarget(const Triple &Target, const VersionTuple &SDKVersion, const Triple *DarwinTargetVariantTriple, const VersionTuple &DarwinTargetVariantSDKVersion)

virtual void emitCodeAlignment(Align Alignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0)

Emit nops until the byte alignment ByteAlignment is reached.

virtual void emitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame)

virtual void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue)

Set the DescValue for the Symbol.

virtual void emitCFIDefCfaRegister(int64_t Register, SMLoc Loc={})

virtual void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment)

Emit a local common (.lcomm) symbol.

virtual MCSymbol * getDwarfLineTableSymbol(unsigned CUID)

virtual void emitCFIRegister(int64_t Register1, int64_t Register2, SMLoc Loc={})

virtual void emitCOFFSafeSEH(MCSymbol const *Symbol)

virtual void emitWinCFIFuncletOrFuncEnd(SMLoc Loc=SMLoc())

This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emi...

virtual void emitXCOFFRenameDirective(const MCSymbol *Name, StringRef Rename)

Emit a XCOFF .rename directive which creates a synonym for an illegal or undesirable name.

virtual void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, uint64_t Discriminator, const MCPseudoProbeInlineStack &InlineStack, MCSymbol *FnSym)

Emit the a pseudo probe into the current section.

virtual void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count)

virtual void emitCFIAdjustCfaOffset(int64_t Adjustment, SMLoc Loc={})

unsigned emitULEB128IntValue(uint64_t Value, unsigned PadTo=0)

Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...

virtual void emitULEB128Value(const MCExpr *Value)

ArrayRef< MCDwarfFrameInfo > getDwarfFrameInfos() const

virtual void emitCFIRelOffset(int64_t Register, int64_t Offset, SMLoc Loc)

virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value, SMLoc Loc)

Emit some number of copies of Value until the byte offset Offset is reached.

MCSymbol * endSection(MCSection *Section)

virtual void switchSection(MCSection *Section, uint32_t Subsec=0)

Set the current section where code is being emitted to Section.

virtual void emitExplicitComments()

Emit added explicit comments.

WinEH::FrameInfo * EnsureValidWinFrameInfo(SMLoc Loc)

Retrieve the current frame info if one is available and it is not yet closed.

virtual void emitThumbFunc(MCSymbol *Func)

Note in the output that the specified Func is a Thumb mode function (ARM target only).

virtual void emitCFIRestoreState(SMLoc Loc)

virtual void emitXCOFFRefDirective(const MCSymbol *Symbol)

Emit a XCOFF .ref directive which creates R_REF type entry in the relocation table for one or more sy...

virtual void emitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol)

virtual void emitCVDefRangeDirective(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > Ranges, StringRef FixedSizePortion)

This implements the CodeView '.cv_def_range' assembler directive.

void emitInt32(uint64_t Value)

virtual void emitCFIOffset(int64_t Register, int64_t Offset, SMLoc Loc={})

virtual void emitWinCFISetFrame(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())

void maybeEmitDwarf64Mark()

Emit a special value of 0xffffffff if producing 64-bit debugging info.

virtual void emitDTPRel32Value(const MCExpr *Value)

Emit the expression Value into the output as a dtprel (32-bit DTP relative) value.

virtual void emitCFIDefCfaOffset(int64_t Offset, SMLoc Loc={})

virtual void emitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc)

This implements the CodeView '.cv_loc' assembler directive.

virtual void emitWinCFIAllocStack(unsigned Size, SMLoc Loc=SMLoc())

virtual void emitFileDirective(StringRef Filename)

Switch to a new logical file.

virtual void emitSLEB128Value(const MCExpr *Value)

virtual void emitCFIValOffset(int64_t Register, int64_t Offset, SMLoc Loc={})

virtual void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, bool KeepOriginalSym)

Emit an ELF .symver directive.

virtual void emitXCOFFCInfoSym(StringRef Name, StringRef Metadata)

Emit a C_INFO symbol with XCOFF embedded metadata to the .info section.

MCSection * getCurrentSectionOnly() const

virtual void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())

Emit the expression Value into the output as a native integer of the given Size bytes.

void emitRawText(const Twine &String)

If this file is backed by a assembly streamer, this dumps the specified string in the output ....

void emitZeros(uint64_t NumBytes)

Emit NumBytes worth of zeros.

unsigned emitSLEB128IntValue(int64_t Value)

Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integ...

virtual bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc)

Introduces an inline call site id for use with .cv_loc.

virtual void emitCFISignalFrame()

virtual void emitVersionMin(MCVersionMinType Type, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)

Specify the Mach-O minimum deployment target version.

virtual void emitCOFFSymbolStorageClass(int StorageClass)

Emit the storage class of the symbol.

virtual void emitConditionalAssignment(MCSymbol *Symbol, const MCExpr *Value)

Emit an assignment of Value to Symbol, but only if Value is also emitted.

virtual void emitWinCFIStartChained(SMLoc Loc=SMLoc())

virtual void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, Align ByteAlignment=Align(1))

Emit a thread local bss (.tbss) symbol.

virtual void emitCFIRestore(int64_t Register, SMLoc Loc={})

virtual void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)

This implements the CodeView '.cv_inline_linetable' assembler directive.

void emitFill(uint64_t NumBytes, uint8_t FillValue)

Emit NumBytes bytes worth of the value specified by FillValue.

virtual void emitBundleAlignMode(Align Alignment)

Set the bundle alignment mode from now on in the section.

virtual void emitRawTextImpl(StringRef String)

EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the ...

virtual void emitBytes(StringRef Data)

Emit the bytes in Data into the output.

void finish(SMLoc EndLoc=SMLoc())

Finish emission of machine code.

virtual void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol)

Emit an weak reference from Alias to Symbol.

void visitUsedExpr(const MCExpr &Expr)

virtual void emitDwarfFile0Directive(StringRef Directory, StringRef Filename, std::optional< MD5::MD5Result > Checksum, std::optional< StringRef > Source, unsigned CUID=0)

Specify the "root" file of the compilation, using the ".file 0" extension.

virtual void emitBuildVersion(unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)

Emit/Specify Mach-O build version command.

virtual void changeSection(MCSection *, uint32_t)

This is called by popSection and switchSection, if the current section changes.

virtual void emitCFILLVMDefAspaceCfa(int64_t Register, int64_t Offset, int64_t AddressSpace, SMLoc Loc={})

Generic base class for all target subtargets.

Represent a reference to a symbol from inside an expression.

static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

Target specific streamer interface.

virtual void emitDwarfFileDirective(StringRef Directive)

virtual void emitValue(const MCExpr *Value)

virtual void prettyPrintAsm(MCInstPrinter &InstPrinter, uint64_t Address, const MCInst &Inst, const MCSubtargetInfo &STI, raw_ostream &OS)

virtual ~MCTargetStreamer()

virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)

virtual void emitRawBytes(StringRef Data)

Emit the bytes in Data into the output.

MCTargetStreamer(MCStreamer &S)

virtual void changeSection(const MCSection *CurSection, MCSection *Section, uint32_t SubSection, raw_ostream &OS)

Update streamer for a new active section.

virtual void emitLabel(MCSymbol *Symbol)

virtual void emitConstantPools()

Wrapper class representing virtual and physical registers.

Represents a location in source code.

SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...

StringRef str() const

Explicit conversion to StringRef.

void push_back(const T &Elt)

pointer data()

Return a pointer to the vector's buffer, even if empty().

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

StringRef - Represent a constant reference to a string, i.e.

Target - Wrapper for Target specific information.

Triple - Helper class for working with autoconf configuration names.

bool isMacOSX() const

Is this a Mac OS X triple.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

The instances of the Type class are immutable: once they are created, they are never changed.

LLVM Value Representation.

void print(raw_ostream &O, bool IsForDebug=false) const

Implement operator<< on Value.

Represents a version number in the form major[.minor[.subminor[.build]]].

bool empty() const

Determine whether this version information is empty (e.g., all version components are zero).

This class implements an extremely fast bulk output stream that can only output to a stream.

A raw_ostream that writes to an SmallVector or SmallString.

StringRef str() const

Return a StringRef for the vector contents.

This class represents a function that is read from a sample profile.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

@ IMAGE_COMDAT_SELECT_ANY

@ C

The default llvm calling convention, compatible with C.

SymbolKind

Duplicate copy of the above enum, but using the official CV names.

uint8_t getDwarfOffsetByteSize(DwarfFormat Format)

The size of a reference determined by the DWARF 32/64-bit format.

@ DW_LENGTH_lo_reserved

Special values for an initial length field.

@ DW_LENGTH_DWARF64

Indicator of 64-bit DWARF format.

value_type byte_swap(value_type value, endianness endian)

static const bool IsLittleEndianHost

This is an optimization pass for GlobalISel generic memory operations.

void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, unsigned StoreBytes)

StoreIntToMemory - Fills the StoreBytes bytes of memory starting from Dst with the integer held in In...

bool isUIntN(unsigned N, uint64_t x)

Checks if an unsigned integer fits into the given (dynamic) bit width.

std::pair< MCSection *, uint32_t > MCSectionSubPair

decltype(auto) get(const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info > &Pair)

@ MCVM_WatchOSVersionMin

.watchos_version_min

@ MCVM_OSXVersionMin

.macosx_version_min

@ MCVM_TvOSVersionMin

.tvos_version_min

@ MCVM_IOSVersionMin

.ios_version_min

void report_fatal_error(Error Err, bool gen_crash_diag=true)

Report a serious error, calling any installed error handler.

raw_ostream & nulls()

This returns a reference to a raw_ostream which simply discards output.

bool isIntN(unsigned N, int64_t x)

Checks if an signed integer fits into the given (dynamic) bit width.

unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)

Utility function to encode a SLEB128 value to an output stream.

unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)

Utility function to encode a ULEB128 value to an output stream.

This struct is a compact representation of a valid (non-zero power of two) alignment.

Information describing a function or inlined call site introduced by .cv_func_id or ....

MCSection * Section

The section of the first .cv_loc directive used for this function, or null if none has been seen yet.

const MCSymbol * Personality

unsigned PersonalityEncoding

std::vector< MCCFIInstruction > Instructions

unsigned CurrentCfaRegister

static WinEH::Instruction SaveXMM(MCSymbol *L, unsigned Reg, unsigned Offset)

static WinEH::Instruction PushNonVol(MCSymbol *L, unsigned Reg)

static WinEH::Instruction PushMachFrame(MCSymbol *L, bool Code)

static WinEH::Instruction SaveNonVol(MCSymbol *L, unsigned Reg, unsigned Offset)

static WinEH::Instruction Alloc(MCSymbol *L, unsigned Size)

static WinEH::Instruction SetFPReg(MCSymbol *L, unsigned Reg, unsigned Off)

std::vector< Instruction > Instructions

const MCSymbol * Function

const MCSymbol * PrologEnd

const MCSymbol * FuncletOrFuncEnd

const FrameInfo * ChainedParent

const MCSymbol * ExceptionHandler