LLVM: include/llvm/MC/MCStreamer.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_MC_MCSTREAMER_H

14#define LLVM_MC_MCSTREAMER_H

15

32#include

33#include

34#include

35#include

36#include

37#include

38#include

39

40namespace llvm {

41

58

64}

65

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

94protected:

96

97public:

100

103

104

105 virtual void emitLabel(MCSymbol *Symbol);

106

108

112

114

115

116

117

118

119 virtual void changeSection(const MCSection *CurSection, MCSection *Section,

121

122 virtual void emitValue(const MCExpr *Value);

123

124

125

126

128

129 virtual void emitConstantPools();

130

131 virtual void finish();

132};

133

134

135

137public:

140

152 bool isVector);

155

168

170

172

175

176

179

181

192

193

194

195 virtual void reset();

196

197

198

199

201

202

203

205

206private:

207 std::unique_ptr ConstantPools;

208};

209

210

211

212

213

214

215

216

217

218

219

222 std::unique_ptr TargetStreamer;

223

224 std::vector DwarfFrameInfos;

225

226

227

230

231

232

233 std::vector<std::unique_ptrWinEH::FrameInfo> WinFrameInfos;

234

236 size_t CurrentProcWinFrameInfoStartIndex;

237

238

239

241

242

243

244 const SMLoc *StartTokLocPtr = nullptr;

245

246

247

248

249

250 unsigned NextWinCFIID = 0;

251

252 bool UseAssemblerInfoForParsing = true;

253

254

255

256

257

258

259 bool AllowAutoPadding = false;

260

261protected:

263

264

266

268

270

271

272

274

276

279

281 return CurrentWinFrameInfo;

282 }

283

284 virtual void emitWindowsUnwindTables(WinEH::FrameInfo *Frame);

285

286 virtual void emitWindowsUnwindTables();

287

289

290

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

292

293public:

297

300

302 TargetStreamer.reset(TS);

303 }

304

307 return StartTokLocPtr ? *StartTokLocPtr : SMLoc();

308 }

309

310

311

312 virtual void reset();

313

316

317

318

320

323

325 return TargetStreamer.get();

326 }

327

330

331 MCSymbol *emitLineTableLabel();

332

333

334

335 virtual MCSymbol *emitCFILabel();

336

337

338

340

341 unsigned getNumFrameInfos();

343

344 bool hasUnfinishedDwarfFrameInfo();

345

348 return WinFrameInfos;

349 }

350

354

356

357 void generateCompactUnwindEncodings(MCAsmBackend *MAB);

358

359

360

361

362

363

365

366

367

369

370

371

373

374

375

376

377

378

379

380

381

382

383

384

385

386

388

389

390

391

393

394

395

396

397

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

399

400

401

402 virtual void addExplicitComment(const Twine &T);

403

404

405 virtual void emitExplicitComments();

406

407

409

410

411

412

413

414

415

417 if (!SectionStack.empty())

418 return SectionStack.back().first;

420 }

422 return CurFrag->getParent();

423 }

424

425

427 if (!SectionStack.empty())

428 return SectionStack.back().second;

430 }

431

442

444 SectionStack.push_back(

446 }

447

448

449

450

451

452 virtual bool popSection();

453

454

455

456

457

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

460

461

462 void switchSectionNoPrint(MCSection *Section);

463

464

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

466

468

469

470

472

473

474

475

476

477

478

479

480

481

482

484

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

486

487

488 virtual void emitSubsectionsViaSymbols();

489

490

491

493

494

496

497

499 unsigned Minor, unsigned Update,

501

502

503

505 unsigned Minor, unsigned Update,

507

509 unsigned Major,

510 unsigned Minor,

511 unsigned Update,

513

514 void emitVersionForTarget(const Triple &Target,

516 const Triple *DarwinTargetVariantTriple,

517 const VersionTuple &DarwinTargetVariantSDKVersion);

518

519

520

521

522

523

524

525

526

527

528

529

531

532

533

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

535

536

537

538

539

540

541

542

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

544

545

548

549

550

551

552

554

555

556

557

559

560

561

562

564

565

566

567

569

570

572

574

575

577

578

579

580

582

583

584

585

587

588

589

590

592

593

594

596

597

598

600

601

602

603

604

605

606

609

610

611

612

613

614

615

619

620

621

622

623

624

625

626

628

629

630

631

632

633

634

637 unsigned Lang, unsigned Reason,

638 unsigned FunctionSize, bool hasDebug);

639

640

641

642

643

645

646

647

648

649

651

652

653

654

655

657

658

659

660

661

663 StringRef Name, bool KeepOriginalSym);

664

665

666

668

669

671

672

673

674

675

676

678 Align ByteAlignment) = 0;

679

680

681

682

683

684

686 Align ByteAlignment);

687

688

689

690

691

692

693

697

698

699

700

701

702

703

706

707

708

709

710

711

712

713

714

716

717

718

720

721

722

723

724

725

726

727

728

729

730

733

735

736

737

740

741

742

743

747

752

753

754

755

759

760 virtual void emitULEB128Value(const MCExpr *Value);

761

762 virtual void emitSLEB128Value(const MCExpr *Value);

763

764

765

766 unsigned emitULEB128IntValue(uint64_t Value, unsigned PadTo = 0);

767

768

769

770 unsigned emitSLEB128IntValue(int64_t Value);

771

772

773

774 void emitSymbolValue(const MCSymbol *Sym, unsigned Size,

775 bool IsSectionRelative = false);

776

777

778

780

781

782

783

784

785

786

787

788 virtual void emitFill(const MCExpr &NumBytes, uint64_t FillValue,

790

791

792

793

794

795

796

797

798

799 virtual void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,

801

802 virtual void emitNops(int64_t NumBytes, int64_t ControlledNopLength,

804

805

806

807 void emitZeros(uint64_t NumBytes);

808

809

810

811

812

813

814

815

816

817

818

819

820

821

822

823

824

825 virtual void emitValueToAlignment(Align Alignment, int64_t Fill = 0,

827 unsigned MaxBytesToEmit = 0);

828

829

830

831

832

833

834

835

836

837

838

840 unsigned MaxBytesToEmit = 0);

841

842

843

844

845

846

847

848

849

850 virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value,

852

853

854

855

856

857 virtual void emitFileDirective(StringRef Filename);

858

859

860 virtual void emitFileDirective(StringRef Filename, StringRef CompilerVersion,

862

863

864

866

867

868

871 std::optionalMD5::MD5Result Checksum = std::nullopt,

872 std::optional Source = std::nullopt, unsigned CUID = 0) {

875 Source, CUID));

876 }

877

878

879

880

881

882

885 std::optionalMD5::MD5Result Checksum = std::nullopt,

886 std::optional Source = std::nullopt, unsigned CUID = 0);

887

888

889 virtual void emitDwarfFile0Directive(StringRef Directory, StringRef Filename,

890 std::optionalMD5::MD5Result Checksum,

891 std::optional Source,

892 unsigned CUID = 0);

893

894 virtual void emitCFIBKeyFrame();

895 virtual void emitCFIMTETaggedFrame();

896

897

898

899 virtual void emitDwarfLocDirective(unsigned FileNo, unsigned Line,

900 unsigned Column, unsigned Flags,

901 unsigned Isa, unsigned Discriminator,

904

905

906 virtual void emitDwarfLocLabelDirective(SMLoc Loc, StringRef Name);

907

908

909

910

911 virtual bool emitCVFileDirective(unsigned FileNo, StringRef Filename,

912 ArrayRef<uint8_t> Checksum,

913 unsigned ChecksumKind);

914

915

916 virtual bool emitCVFuncIdDirective(unsigned FunctionId);

917

918

919

920 virtual bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc,

921 unsigned IAFile, unsigned IALine,

922 unsigned IACol, SMLoc Loc);

923

924

925 virtual void emitCVLocDirective(unsigned FunctionId, unsigned FileNo,

926 unsigned Line, unsigned Column,

927 bool PrologueEnd, bool IsStmt,

928 StringRef FileName, SMLoc Loc);

929

930

931 virtual void emitCVLinetableDirective(unsigned FunctionId,

932 const MCSymbol *FnStart,

933 const MCSymbol *FnEnd);

934

935

936

937 virtual void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId,

938 unsigned SourceFileId,

939 unsigned SourceLineNum,

940 const MCSymbol *FnStartSym,

941 const MCSymbol *FnEndSym);

942

943

944

945 virtual void emitCVDefRangeDirective(

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

947 StringRef FixedSizePortion);

948

949 virtual void emitCVDefRangeDirective(

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

951 codeview::DefRangeRegisterRelHeader DRHdr);

952

953 virtual void emitCVDefRangeDirective(

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

955 codeview::DefRangeSubfieldRegisterHeader DRHdr);

956

957 virtual void emitCVDefRangeDirective(

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

959 codeview::DefRangeRegisterHeader DRHdr);

960

961 virtual void emitCVDefRangeDirective(

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

963 codeview::DefRangeFramePointerRelHeader DRHdr);

964

965

967

968

970

971

972

974

975

977

978

979

980

981 virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo,

982 unsigned Size);

983

984

985 virtual void emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi,

986 const MCSymbol *Lo);

987

988 virtual MCSymbol *getDwarfLineTableSymbol(unsigned CUID);

989 virtual void emitCFISections(bool EH, bool Debug, bool SFrame);

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

991 void emitCFIEndProc();

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

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

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

995 virtual void emitCFILLVMDefAspaceCfa(int64_t Register, int64_t Offset,

996 int64_t AddressSpace, SMLoc Loc = {});

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

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

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

1000 virtual void emitCFIRememberState(SMLoc Loc);

1001 virtual void emitCFIRestoreState(SMLoc Loc);

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

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

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

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

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

1007 virtual void emitCFIReturnColumn(int64_t Register);

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

1009 virtual void emitCFISignalFrame();

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

1011 virtual void emitCFIRegister(int64_t Register1, int64_t Register2,

1012 SMLoc Loc = {});

1013 virtual void emitCFIWindowSave(SMLoc Loc = {});

1014 virtual void emitCFINegateRAState(SMLoc Loc = {});

1015 virtual void emitCFINegateRAStateWithPC(SMLoc Loc = {});

1016 virtual void emitCFILabelDirective(SMLoc Loc, StringRef Name);

1017 virtual void emitCFIValOffset(int64_t Register, int64_t Offset,

1018 SMLoc Loc = {});

1019

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

1021 virtual void emitWinCFIEndProc(SMLoc Loc = SMLoc());

1022

1023

1024

1025

1026 virtual void emitWinCFIFuncletOrFuncEnd(SMLoc Loc = SMLoc());

1027 virtual void emitWinCFIStartChained(SMLoc Loc = SMLoc());

1028 virtual void emitWinCFIEndChained(SMLoc Loc = SMLoc());

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

1030 virtual void emitWinCFISetFrame(MCRegister Register, unsigned Offset,

1031 SMLoc Loc = SMLoc());

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

1033 virtual void emitWinCFISaveReg(MCRegister Register, unsigned Offset,

1034 SMLoc Loc = SMLoc());

1035 virtual void emitWinCFISaveXMM(MCRegister Register, unsigned Offset,

1036 SMLoc Loc = SMLoc());

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

1038 virtual void emitWinCFIEndProlog(SMLoc Loc = SMLoc());

1039 virtual void emitWinCFIBeginEpilogue(SMLoc Loc = SMLoc());

1040 virtual void emitWinCFIEndEpilogue(SMLoc Loc = SMLoc());

1041 virtual void emitWinCFIUnwindV2Start(SMLoc Loc = SMLoc());

1042 virtual void emitWinCFIUnwindVersion(uint8_t Version, SMLoc Loc = SMLoc());

1043 virtual void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except,

1044 SMLoc Loc = SMLoc());

1045 virtual void emitWinEHHandlerData(SMLoc Loc = SMLoc());

1046

1047 virtual void emitCGProfileEntry(const MCSymbolRefExpr *From,

1048 const MCSymbolRefExpr *To, uint64_t Count);

1049

1050

1051

1052

1053 MCSection *getAssociatedPDataSection(const MCSection *TextSec);

1054

1055

1056 MCSection *getAssociatedXDataSection(const MCSection *TextSec);

1057

1058 virtual void emitSyntaxDirective();

1059

1060

1063

1066

1067

1069

1070

1075

1076

1077

1078

1080

1081

1082 virtual void finishImpl();

1083

1084 void finish(SMLoc EndLoc = SMLoc());

1085

1087

1088

1089 void maybeEmitDwarf64Mark();

1090

1091

1092

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

1094

1095

1096

1097

1098 virtual MCSymbol *emitDwarfUnitLength(const Twine &Prefix,

1099 const Twine &Comment);

1100

1101

1102 virtual void emitDwarfLineStartLabel(MCSymbol *StartSym);

1103

1104

1107

1108

1109

1110

1114 unsigned PointerSize) {}

1115};

1116

1118 return Streamer.getContext();

1119}

1120

1121

1122

1124

1125}

1126

1127#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

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

This file defines the DenseMap class.

Promote Memory to Register

This file defines the SmallVector class.

Defines the llvm::VersionTuple class, which represents a version in the form major[....

Class for arbitrary precision integers.

virtual void emitUnwindRaw(int64_t StackOffset, const SmallVectorImpl< uint8_t > &Opcodes)

~ARMTargetStreamer() override

void emitTargetAttributes(const MCSubtargetInfo &STI)

Emit the build attributes that only depend on the hardware that we expect.

virtual void reset()

Reset any state between object emissions, i.e.

virtual void emitSetFP(MCRegister FpReg, MCRegister SpReg, int64_t Offset=0)

virtual void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE)

virtual void finishAttributeSection()

ARMTargetStreamer(MCStreamer &S)

virtual void emitMovSP(MCRegister Reg, int64_t Offset=0)

virtual void emitARMWinCFISaveSP(unsigned Reg)

virtual void emitPersonalityIndex(unsigned Index)

virtual void emitInst(uint32_t Inst, char Suffix='\0')

virtual void emitARMWinCFISaveLR(unsigned Offset)

virtual void emitArchExtension(uint64_t ArchExt)

virtual void emitTextAttribute(unsigned Attribute, StringRef String)

virtual void emitARMWinCFIAllocStack(unsigned Size, bool Wide)

virtual void emitARMWinCFICustom(unsigned Opcode)

virtual void emitARMWinCFISaveRegMask(unsigned Mask, bool Wide)

virtual void emitRegSave(const SmallVectorImpl< MCRegister > &RegList, bool isVector)

virtual void emitARMWinCFIEpilogEnd()

virtual void emitARMWinCFIPrologEnd(bool Fragment)

virtual void switchVendor(StringRef Vendor)

virtual void emitCode16()

virtual void emitFnStart()

virtual void emitPersonality(const MCSymbol *Personality)

virtual void emitObjectArch(ARM::ArchKind Arch)

const MCExpr * addConstantPoolEntry(const MCExpr *, SMLoc Loc)

Callback used to implement the ldr= pseudo.

virtual void emitHandlerData()

virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue="")

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

virtual void emitThumbFunc(MCSymbol *Symbol)

virtual void emitFPU(ARM::FPUKind FPU)

virtual void emitCantUnwind()

virtual void emitARMWinCFISaveFRegs(unsigned First, unsigned Last)

virtual void emitCode32()

virtual void emitSyntaxUnified()

virtual void emitARMWinCFIEpilogStart(unsigned Condition)

virtual void emitPad(int64_t Offset)

void emitCurrentConstantPool()

Callback used to implement the .ltorg directive.

virtual void emitAttribute(unsigned Attribute, unsigned Value)

virtual void emitARMWinCFINop(bool Wide)

void emitConstantPools() override

virtual void emitArch(ARM::ArchKind Arch)

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

Functions, function parameters, and return types can have attributes to indicate how they should be t...

Tagged union holding either a T or a Error.

Generic interface to target specific assembler backends.

Context object for machine code objects.

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

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

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

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.

Definition MCStreamer.h:220

virtual void emitAddrsig()

Definition MCStreamer.h:1064

virtual void addBlankLine()

Emit a blank line to a .s file to pretty it up.

Definition MCStreamer.h:408

virtual void visitUsedSymbol(const MCSymbol &Sym)

MCSectionSubPair getPreviousSection() const

Return the previous section that the streamer is emitting code to.

Definition MCStreamer.h:426

virtual void beginCOFFSymbolDef(const MCSymbol *Symbol)

Start emitting COFF symbol definition.

virtual void emitBinaryData(StringRef Data)

Functionally identical to EmitBytes.

MCStreamer(const MCStreamer &)=delete

virtual void emitGNUAttribute(unsigned Tag, unsigned Value)

Emit a .gnu_attribute directive.

Definition MCStreamer.h:670

virtual void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, Align ByteAlignment=Align(1), SMLoc Loc=SMLoc())

Emit the zerofill section and an optional symbol.

unsigned getNumWinFrameInfos()

Definition MCStreamer.h:346

void setStartTokLocPtr(const SMLoc *Loc)

Definition MCStreamer.h:305

MCFragment * getCurrentFragment() const

Definition MCStreamer.h:432

virtual bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute)=0

Add the given Attribute to Symbol.

virtual void emitCOFFSymbolType(int Type)

Emit the type of the symbol.

virtual void emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc={})

Record a relocation described by the .reloc directive.

Definition MCStreamer.h:1061

virtual void emitCOFFSymbolIndex(MCSymbol const *Symbol)

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

virtual void emitCVStringTableDirective()

This implements the CodeView '.cv_stringtable' assembler directive.

Definition MCStreamer.h:966

virtual bool hasRawTextSupport() const

Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.

Definition MCStreamer.h:368

virtual void emitIntValueInHex(uint64_t Value, unsigned Size)

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

Definition MCStreamer.h:744

virtual bool isVerboseAsm() const

Return true if this streamer supports verbose assembly and if it is enabled.

Definition MCStreamer.h:364

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.

unsigned emitDwarfFileDirective(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.

Definition MCStreamer.h:869

WinEH::FrameInfo::Epilog * getCurrentWinEpilog() const

Definition MCStreamer.h:351

virtual void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment)=0

Emit a common symbol.

virtual MCAssembler * getAssemblerPtr()

Definition MCStreamer.h:319

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

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

void setTargetStreamer(MCTargetStreamer *TS)

Definition MCStreamer.h:301

virtual bool isIntegratedAssemblerRequired() const

Is the integrated assembler required for this streamer to function correctly?

Definition MCStreamer.h:372

virtual void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame)

virtual void emitCVFileChecksumOffsetDirective(unsigned FileNo)

This implements the CodeView '.cv_filechecksumoffset' assembler directive.

Definition MCStreamer.h:973

bool getUseAssemblerInfoForParsing()

Definition MCStreamer.h:322

virtual void emitCOFFSecNumber(MCSymbol const *Symbol)

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

MCContext & getContext() const

Definition MCStreamer.h:314

SMLoc getStartTokLoc() const

Definition MCStreamer.h:306

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 AddComment(const Twine &T, bool EOL=true)

Add a textual comment.

Definition MCStreamer.h:387

virtual void emitCVFPOData(const MCSymbol *ProcSym, SMLoc Loc={})

This implements the CodeView '.cv_fpo_data' assembler directive.

Definition MCStreamer.h:976

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 emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset)

Emits a COFF section relative relocation.

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

virtual void emitIdent(StringRef IdentString)

Emit the "identifiers" directive.

Definition MCStreamer.h:865

virtual StringRef getMnemonic(const MCInst &MI) const

Returns the mnemonic for MI, if the streamer has access to a instruction printer and returns an empty...

Definition MCStreamer.h:471

virtual void emitCVFileChecksumsDirective()

This implements the CodeView '.cv_filechecksums' assembler directive.

Definition MCStreamer.h:969

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 emitCOFFSectionIndex(MCSymbol const *Symbol)

Emits a COFF section index.

void setAllowAutoPadding(bool v)

Definition MCStreamer.h:328

virtual void emitCOFFSecOffset(MCSymbol const *Symbol)

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

MCTargetStreamer * getTargetStreamer()

Definition MCStreamer.h:324

virtual void emitIntValueInHexWithPadding(uint64_t Value, unsigned Size)

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

Definition MCStreamer.h:756

MCStreamer(MCContext &Ctx)

MCFragment * CurFrag

Definition MCStreamer.h:267

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

Definition MCStreamer.h:508

virtual bool mayHaveInstructions(MCSection &Sec) const

Definition MCStreamer.h:1086

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.

bool isInEpilogCFI() const

Definition MCStreamer.h:355

virtual void emitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel, const MCSymbol *Label, unsigned PointerSize)

If targets does not support representing debug line section by .loc/.file directives in assembly outp...

Definition MCStreamer.h:1111

void emitInt16(uint64_t Value)

Definition MCStreamer.h:749

virtual void emitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame)

virtual void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue)

Set the DescValue for the Symbol.

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

Emit a local common (.lcomm) symbol.

size_t getCurFragSize() const

Definition MCStreamer.h:441

virtual void emitCOFFSafeSEH(MCSymbol const *Symbol)

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

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

void pushSection()

Save the current and previous section on the section stack.

Definition MCStreamer.h:443

bool IsObj

Definition MCStreamer.h:262

void setUseAssemblerInfoForParsing(bool v)

Definition MCStreamer.h:321

virtual void emitDataRegion(MCDataRegionType Kind)

Note in the output the specified region Kind.

Definition MCStreamer.h:495

bool getAllowAutoPadding() const

Definition MCStreamer.h:329

virtual void emitLinkerOptions(ArrayRef< std::string > Kind)

Emit the given list Options of strings as linker options into the output.

Definition MCStreamer.h:492

void emitInt64(uint64_t Value)

Definition MCStreamer.h:751

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...

void emitInt32(uint64_t Value)

Definition MCStreamer.h:750

ArrayRef< std::unique_ptr< WinEH::FrameInfo > > getWinFrameInfos() const

Definition MCStreamer.h:347

MCSectionSubPair getCurrentSection() const

Return the current section that the streamer is emitting code to.

Definition MCStreamer.h:416

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

Definition MCStreamer.h:421

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.

MCStreamer & operator=(const MCStreamer &)=delete

virtual void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel, MCSymbol *EndLabel=nullptr)

Emit the debug line end entry.

Definition MCStreamer.h:1105

virtual void emitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args)

Emit a Linker Optimization Hint (LOH) directive.

Definition MCStreamer.h:667

void addFragment(MCFragment *F)

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

Specify the Mach-O minimum deployment target version.

Definition MCStreamer.h:498

virtual void emitCOFFSymbolStorageClass(int StorageClass)

Emit the storage class of the symbol.

WinEH::FrameInfo * getCurrentWinFrameInfo()

Definition MCStreamer.h:280

void emitInt8(uint64_t Value)

Definition MCStreamer.h:748

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

Emit a thread local bss (.tbss) symbol.

WinEH::FrameInfo::Epilog * CurrentWinEpilog

Definition MCStreamer.h:265

virtual void emitBytes(StringRef Data)

Emit the bytes in Data into the output.

virtual void emitAddrsigSym(const MCSymbol *Sym)

Definition MCStreamer.h:1065

void visitUsedExpr(const MCExpr &Expr)

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

Emit/Specify Mach-O build version command.

Definition MCStreamer.h:504

virtual void changeSection(MCSection *, uint32_t)

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

bool isObj() const

Definition MCStreamer.h:315

Generic base class for all target subtargets.

Represent a reference to a symbol from inside an expression.

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

Target specific streamer interface.

Definition MCStreamer.h:93

virtual ~MCTargetStreamer()

MCStreamer & getStreamer()

Definition MCStreamer.h:101

MCContext & getContext()

Definition MCStreamer.h:1117

MCStreamer & Streamer

Definition MCStreamer.h:95

MCTargetStreamer(MCStreamer &S)

Represents a location in source code.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

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

StackOffset holds a fixed and a scalable offset in bytes.

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.

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.

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

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

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI MCStreamer * createNullStreamer(MCContext &Ctx)

Create a dummy machine code streamer, which does nothing.

MCLOHDirective::LOHArgs MCLOHArgs

SmallVector< InlineSite, 8 > MCPseudoProbeInlineStack

@ First

Helpers to iterate all locations in the MemoryEffectsBase class.

void cantFail(Error Err, const char *Msg=nullptr)

Report a fatal error if Err is a failure value.

FunctionAddr VTableAddr uintptr_t uintptr_t Data

MCLOHType

Linker Optimization Hint Type.

std::pair< MCSection *, uint32_t > MCSectionSubPair

Definition MCStreamer.h:66

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