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

1

2

3

4

5

6

7

8

9#ifndef LLVM_MC_MCCONTEXT_H

10#define LLVM_MC_MCCONTEXT_H

11

34#include

35#include

36#include

37#include

38#include

39#include

40#include

41#include

42#include

43#include

44#include

45

46namespace llvm {

47

75

76namespace wasm {

78}

79

80

81

82

84public:

88 std::vector<const MDNode *> &)>;

99

100private:

101 Environment Env;

102

103

104

105 StringRef Swift5ReflectionSegmentName;

106

107

109

110

112

113

114 std::unique_ptr InlineSrcMgr;

115 std::vector<const MDNode *> LocInfos;

116

118

119

121

122

124

125

127

128

130

131 std::unique_ptr CVContext;

132

133

134

135

136

138

139

141

151

153

154

156

157

158

159

160

161

162

164

165

167

168

170

171

172 unsigned NextInstance(unsigned LocalLabelVal);

173

174

175 unsigned GetInstance(unsigned LocalLabelVal);

176

177

178 uint8_t BBAddrMapVersion = 4;

179

180

181

182

183 std::string SecureLogFile;

184

185 std::unique_ptr<raw_fd_ostream> SecureLog;

186

187

188

189 bool SecureLogUsed = false;

190

191

193

194

196

197

198 std::string MainFileName;

199

200

201

202

203

204 std::map<unsigned, MCDwarfLineTable> MCDwarfLineTablesCUMap;

205

206

208 bool DwarfLocSeen = false;

209

210

211 bool GenDwarfForAssembly = false;

212

213

214

215 unsigned GenDwarfFileNumber = 0;

216

217

219

220

221

222 std::vector MCGenDwarfLabelEntries;

223

224

225

227

228

229

231

232

234

235

237

238

239

240

241 bool SaveTempLabels = false;

242 bool UseNamesOnTempLabels = false;

243

244

245 unsigned DwarfCompileUnitID = 0;

246

247

249

250 struct COFFSectionKey {

253 int SelectionKey;

255

260

262 return std::tie(SectionName, GroupName, SelectionKey, UniqueID) <

263 std::tie(Other.SectionName, Other.GroupName, Other.SelectionKey,

265 }

266 };

267

268 struct WasmSectionKey {

269 std::string SectionName;

270 StringRef GroupName;

271 unsigned UniqueID;

272

273 WasmSectionKey(StringRef SectionName, StringRef GroupName,

274 unsigned UniqueID)

275 : SectionName(SectionName), GroupName(GroupName), UniqueID(UniqueID) {}

276

277 bool operator<(const WasmSectionKey &Other) const {

278 return std::tie(SectionName, GroupName, UniqueID) <

279 std::tie(Other.SectionName, Other.GroupName, Other.UniqueID);

280 }

281 };

282

283 struct XCOFFSectionKey {

284

285 std::string SectionName;

286

287

288

289 union {

292 };

293 bool IsCsect;

294

295 XCOFFSectionKey(StringRef SectionName,

297 : SectionName(SectionName), MappingClass(MappingClass), IsCsect(true) {}

298

299 XCOFFSectionKey(StringRef SectionName,

301 : SectionName(SectionName), DwarfSubtypeFlags(DwarfSubtypeFlags),

302 IsCsect(false) {}

303

304 bool operator<(const XCOFFSectionKey &Other) const {

305 if (IsCsect && Other.IsCsect)

306 return std::tie(SectionName, MappingClass) <

307 std::tie(Other.SectionName, Other.MappingClass);

308 if (IsCsect != Other.IsCsect)

309 return IsCsect;

310 return std::tie(SectionName, DwarfSubtypeFlags) <

311 std::tie(Other.SectionName, Other.DwarfSubtypeFlags);

312 }

313 };

314

315 StringMap<MCSectionMachO *> MachOUniquingMap;

316 std::map<COFFSectionKey, MCSectionCOFF *> COFFUniquingMap;

317 StringMap<MCSectionELF *> ELFUniquingMap;

318 std::map<std::string, MCSectionGOFF *> GOFFUniquingMap;

319 std::map<WasmSectionKey, MCSectionWasm *> WasmUniquingMap;

320 std::map<XCOFFSectionKey, MCSectionXCOFF *> XCOFFUniquingMap;

321 StringMap<MCSectionDXContainer *> DXCUniquingMap;

322 StringMap RelSecNames;

323

324 SpecificBumpPtrAllocator MCSubtargetAllocator;

325

326

327 bool AutoReset;

328

329 MCTargetOptions const *TargetOptions;

330

331 bool HadError = false;

332

333 void reportCommon(SMLoc Loc,

334 std::function<void(SMDiagnostic &, const SourceMgr *)>);

335

337

339 MCSymbol *createRenamableSymbol(const Twine &Name, bool AlwaysAddSuffix,

340 bool IsTemporary);

341

342 MCSymbol *getOrCreateDirectionalLocalSymbol(unsigned LocalLabelVal,

343 unsigned Instance);

344

345 template

346 Symbol *getOrCreateSectionSymbol(StringRef Section);

347

348 MCSectionELF *createELFSectionImpl(StringRef Section, unsigned Type,

349 unsigned Flags, unsigned EntrySize,

350 const MCSymbolELF *Group, bool IsComdat,

351 unsigned UniqueID,

352 const MCSymbolELF *LinkedToSym);

353

355 bool IsTemporary);

356

357 template

358 MCSectionGOFF *getGOFFSection(SectionKind Kind, StringRef Name,

359 TAttr SDAttributes, MCSection *Parent,

360 bool IsVirtual);

361

362

363 StringMap MacroMap;

364

365

366

367

368

369

370

371 DenseMap<std::tuple<StringRef, unsigned, unsigned>, unsigned> ELFEntrySizeMap;

372

373

374

375

376

377

378 DenseSet ELFSeenGenericMergeableSections;

379

380public:

381 LLVM_ABI explicit MCContext(const Triple &TheTriple, const MCAsmInfo *MAI,

382 const MCRegisterInfo *MRI,

383 const MCSubtargetInfo *MSTI,

384 const SourceMgr *Mgr = nullptr,

385 MCTargetOptions const *TargetOpts = nullptr,

386 bool DoAutoReset = true,

387 StringRef Swift5ReflSegmentName = {});

391

396

398 return Swift5ReflectionSegmentName;

399 }

402

405 std::vector<const MDNode *> &getLocInfos() { return LocInfos; }

407 this->DiagHandler = DiagHandler;

408 }

409

411

413

415

417

419

421

423

425

426

427

428

429

430

432

433

434

435

436

437

439

440

441

442

443

444

445

448

449

450

451

454 bool AlwaysAddSuffix = true);

455

456

457

460

461

462

463

464

466 bool AlwaysEmit = false);

467

468

469

471

472

473

475

476

477

479 bool Before);

480

481

482

483

484

486

487

488

490

491

492

493

494

496 unsigned Idx);

497

499

501

502

504

505

506

507

509

510

513

514

515

516

517

519

520

521

523 return InlineAsmUsedLabelNames.lookup(Name);

524 }

525

526

527

529

530

531

533

534

535

536

537

538

539

540

542 unsigned TypeAndAttributes,

544 const char *BeginSymName = nullptr);

545

547 unsigned TypeAndAttributes, SectionKind K,

548 const char *BeginSymName = nullptr) {

549 return getMachOSection(Segment, Section, TypeAndAttributes, 0, K,

550 BeginSymName);

551 }

552

554 unsigned Flags) {

556 }

557

559 unsigned Flags, unsigned EntrySize) {

562 }

563

565 unsigned Flags, unsigned EntrySize,

566 const Twine &Group, bool IsComdat) {

567 return getELFSection(Section, Type, Flags, EntrySize, Group, IsComdat,

569 }

570

572 unsigned Flags, unsigned EntrySize,

573 const Twine &Group, bool IsComdat,

576

578 unsigned Flags, unsigned EntrySize,

582

583

584

585

586

588 const Twine &Suffix, unsigned Type,

589 unsigned Flags,

590 unsigned EntrySize = 0);

591

594 unsigned EntrySize, const MCSymbolELF *Group,

596

598 bool IsComdat);

599

601 unsigned Flags, unsigned UniqueID,

602 unsigned EntrySize);

603

605

607

608

609

610 LLVM_ABI std::optional

612 unsigned EntrySize);

613

622

627

629 unsigned Characteristics);

630

631

632

633

634

638

640

642 unsigned Flags = 0) {

644 }

645

647 unsigned Flags, const Twine &Group,

649

651 unsigned Flags,

654

655

658

661

664 std::optionalXCOFF::CsectProperties CsectProp = std::nullopt,

665 bool MultiSymbolsAllowed = false,

666 std::optionalXCOFF::DwarfSectionSubtypeFlags DwarfSubtypeFlags =

667 std::nullopt);

668

669

671

673

674

675

676

677

678

679

680

681

683

684

686

687

689 const std::string &To);

690

691

693

694

696

697

698

699

701

702

704

705

708 std::optionalMD5::MD5Result Checksum,

709 std::optional Source, unsigned CUID);

710

712

714 return MCDwarfLineTablesCUMap;

715 }

716

718 return MCDwarfLineTablesCUMap[CUID];

719 }

720

722 auto I = MCDwarfLineTablesCUMap.find(CUID);

723 assert(I != MCDwarfLineTablesCUMap.end());

724 return I->second;

725 }

726

730

734

736

738

739

740

743 std::optionalMD5::MD5Result Checksum,

744 std::optional Source) {

746 Source);

747 }

748

749

753

754

755

756

757

759 unsigned Flags, unsigned Isa,

760 unsigned Discriminator) {

761 CurrentDwarfLoc.setFileNum(FileNum);

762 CurrentDwarfLoc.setLine(Line);

763 CurrentDwarfLoc.setColumn(Column);

764 CurrentDwarfLoc.setFlags(Flags);

765 CurrentDwarfLoc.setIsa(Isa);

766 CurrentDwarfLoc.setDiscriminator(Discriminator);

767 DwarfLocSeen = true;

768 }

769

771

774

780

782 GenDwarfFileNumber = FileNumber;

783 }

784

785

786

788

790 return SectionsForRanges;

791 }

792

794 return SectionsForRanges.insert(Sec);

795 }

796

798

800 return MCGenDwarfLabelEntries;

801 }

802

804 MCGenDwarfLabelEntries.push_back(E);

805 }

806

809

812

815

818

819

820

823

825 SecureLog = std::move(Value);

826 }

827

830

832 return Allocator.Allocate(Size, Align);

833 }

834

836

837

838

842

847

850 return (I == MacroMap.end()) ? nullptr : &I->getValue();

851 }

852

854 MacroMap.insert(std::make_pair(Name, std::move(Macro)));

855 }

856

858

860};

861

862}

863

864

865

866

867

868

869

870

871

872

873

874

875

876

877

878

879

880

881

882

883

884

885

886

887

889 size_t Alignment = 8) noexcept {

890 return C.allocate(Bytes, Alignment);

891}

892

893

894

895

896

897

898inline void operator delete(void *Ptr, llvm::MCContext &C, size_t) noexcept {

899 C.deallocate(Ptr);

900}

901

902

903

904

905

906

907

908

909

910

911

912

913

914

915

916

917

918

919

920

922 size_t Alignment = 8) noexcept {

923 return C.allocate(Bytes, Alignment);

924}

925

926

927

928

929

930

931

933 C.deallocate(Ptr);

934}

935

936#endif

unsigned const MachineRegisterInfo * MRI

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

This file defines the StringMap class.

amdgpu AMDGPU DAG DAG Pattern Instruction Selection

Function Alias Analysis false

This file defines the BumpPtrAllocator interface.

static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

This file defines the DenseMap class.

This file contains constants used for implementing Dwarf debug support.

bool operator<(const DeltaInfo &LHS, int64_t Delta)

This file declares the MCSectionGOFF class, which contains all of the necessary machine code sections...

This file implements a set that has insertion order iteration characteristics.

This file defines the SmallString class.

static void DiagHandler(const SMDiagnostic &Diag, void *Context)

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

Tagged union holding either a T or a Error.

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

Context object for machine code objects.

Definition MCContext.h:83

MCPseudoProbeTable & getMCPseudoProbeTable()

Definition MCContext.h:859

const MCObjectFileInfo * getObjectFileInfo() const

Definition MCContext.h:416

LLVM_ABI void remapDebugPath(SmallVectorImpl< char > &Path)

Remap one path in-place as per the debug prefix map.

LLVM_ABI MCSymbol * createBlockSymbol(const Twine &Name, bool AlwaysEmit=false)

Get or create a symbol for a basic block.

LLVM_ABI MCSubtargetInfo & getSubtargetCopy(const MCSubtargetInfo &STI)

LLVM_ABI MCSectionMachO * getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr)

Return the MCSection for the specified mach-o section.

void * allocate(unsigned Size, unsigned Align=8)

Definition MCContext.h:831

const SetVector< MCSection * > & getGenDwarfSectionSyms()

Definition MCContext.h:789

void deallocate(void *Ptr)

Definition MCContext.h:835

const SmallVectorImpl< std::string > & getMCDwarfDirs(unsigned CUID=0)

Definition MCContext.h:731

Environment getObjectFileType() const

Definition MCContext.h:392

bool isDwarfMD5UsageConsistent(unsigned CUID) const

Reports whether MD5 checksum usage is consistent (all-or-none).

Definition MCContext.h:750

void setObjectFileInfo(const MCObjectFileInfo *Mofi)

Definition MCContext.h:410

bool hadError()

Definition MCContext.h:843

StringRef getDwarfDebugProducer()

Definition MCContext.h:811

LLVM_ABI void setSymbolValue(MCStreamer &Streamer, const Twine &Sym, uint64_t Val)

Set value for a symbol.

bool isMachO() const

Definition MCContext.h:394

const std::string & getMainFileName() const

Get the main file name for use in error messages and debug info.

Definition MCContext.h:700

LLVM_ABI MCSectionCOFF * getCOFFSection(StringRef Section, unsigned Characteristics, StringRef COMDATSymName, int Selection, unsigned UniqueID=MCSection::NonUniqueID)

StringRef getDwarfDebugFlags()

Definition MCContext.h:808

bool getDwarfLocSeen()

Definition MCContext.h:772

LLVM_ABI void addDebugPrefixMapEntry(const std::string &From, const std::string &To)

Add an entry to the debug prefix map.

MCContext(const MCContext &)=delete

LLVM_ABI MCSymbol * createTempSymbol()

Create a temporary symbol with a unique name.

StringRef getCompilationDir() const

Get the compilation directory for DW_AT_comp_dir The compilation directory should be set with setComp...

Definition MCContext.h:682

bool getGenDwarfForAssembly()

Definition MCContext.h:775

LLVM_ABI void RemapDebugPaths()

LLVM_ABI MCInst * createMCInst()

Create and return a new MC instruction.

LLVM_ABI MCSymbol * getOrCreateFrameAllocSymbol(const Twine &FuncName, unsigned Idx)

Gets a symbol that will be defined to the final stack offset of a local variable after codegen.

LLVM_ABI MCSectionELF * createELFRelSection(const Twine &Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, const MCSectionELF *RelInfoSection)

void setSecureLogUsed(bool Value)

Definition MCContext.h:829

void defineMacro(StringRef Name, MCAsmMacro Macro)

Definition MCContext.h:853

LLVM_ABI MCSymbol * createLinkerPrivateTempSymbol()

Create a new linker temporary symbol with the specified prefix (Name) or "tmp".

MCSectionWasm * getWasmSection(const Twine &Section, SectionKind K, unsigned Flags=0)

Definition MCContext.h:641

LLVM_ABI void recordELFMergeableSectionInfo(StringRef SectionName, unsigned Flags, unsigned UniqueID, unsigned EntrySize)

MCSymbol * getInlineAsmLabel(StringRef Name) const

isInlineAsmLabel - Return true if the name is a label referenced in inline assembly.

Definition MCContext.h:522

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

bool isXCOFF() const

Definition MCContext.h:395

LLVM_ABI wasm::WasmSignature * createWasmSignature()

Allocates and returns a new WasmSignature instance (with empty parameter and return type lists).

LLVM_ABI MCSectionELF * getELFNamedSection(const Twine &Prefix, const Twine &Suffix, unsigned Type, unsigned Flags, unsigned EntrySize=0)

Get a section with the provided group identifier.

MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group, bool IsComdat)

Definition MCContext.h:564

MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize)

Definition MCContext.h:558

MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)

Definition MCContext.h:553

LLVM_ABI MCSectionXCOFF * getXCOFFSection(StringRef Section, SectionKind K, std::optional< XCOFF::CsectProperties > CsectProp=std::nullopt, bool MultiSymbolsAllowed=false, std::optional< XCOFF::DwarfSectionSubtypeFlags > DwarfSubtypeFlags=std::nullopt)

void setGenDwarfForAssembly(bool Value)

Definition MCContext.h:776

uint8_t getBBAddrMapVersion() const

Definition MCContext.h:672

LLVM_ABI void diagnose(const SMDiagnostic &SMD)

LLVM_ABI bool isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID=0)

isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and f...

void setDwarfVersion(uint16_t v)

Definition MCContext.h:816

void clearDwarfLocSeen()

Definition MCContext.h:770

const StringRef & getSwift5ReflectionSegmentName() const

Definition MCContext.h:397

LLVM_ABI void registerInlineAsmLabel(MCSymbol *Sym)

registerInlineAsmLabel - Records that the name is a label referenced in inline assembly.

LLVM_ABI MCSymbol * createLocalSymbol(StringRef Name)

Create a local, non-temporary symbol like an ELF mapping symbol.

bool addGenDwarfSection(MCSection *Sec)

Definition MCContext.h:793

StringRef allocateString(StringRef s)

Allocates a copy of the given string on the allocator managed by this context and returns the result.

Definition MCContext.h:839

MCAsmMacro * lookupMacro(StringRef Name)

Definition MCContext.h:848

MCDwarfLineTable & getMCDwarfLineTable(unsigned CUID)

Definition MCContext.h:717

bool getSecureLogUsed()

Definition MCContext.h:828

raw_fd_ostream * getSecureLog()

Definition MCContext.h:822

LLVM_ABI void initInlineSourceManager()

void setDiagnosticHandler(DiagHandlerTy DiagHandler)

Definition MCContext.h:406

unsigned getDwarfCompileUnitID()

Definition MCContext.h:735

LLVM_ABI MCSymbol * getOrCreateParentFrameOffsetSymbol(const Twine &FuncName)

LLVM_ABI MCSymbol * lookupSymbol(const Twine &Name) const

Get the symbol for Name, or null.

LLVM_ABI bool emitCompactUnwindNonCanonical() const

void undefineMacro(StringRef Name)

Definition MCContext.h:857

LLVM_ABI CodeViewContext & getCVContext()

const MCRegisterInfo * getRegisterInfo() const

Definition MCContext.h:414

const SmallVectorImpl< MCDwarfFile > & getMCDwarfFiles(unsigned CUID=0)

Definition MCContext.h:727

LLVM_ABI void reset()

reset - return object to right after construction state to prepare to process a new module

void setDwarfFormat(dwarf::DwarfFormat f)

Definition MCContext.h:813

void setCompilationDir(StringRef S)

Set the compilation directory for DW_AT_comp_dir.

Definition MCContext.h:685

const std::map< unsigned, MCDwarfLineTable > & getMCDwarfLineTables() const

Definition MCContext.h:713

LLVM_ABI bool isELFGenericMergeableSection(StringRef Name)

unsigned getGenDwarfFileNumber()

Definition MCContext.h:777

void setDwarfDebugFlags(StringRef S)

Definition MCContext.h:807

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.

Definition MCContext.h:758

LLVM_ABI MCContext(const Triple &TheTriple, const MCAsmInfo *MAI, const MCRegisterInfo *MRI, const MCSubtargetInfo *MSTI, const SourceMgr *Mgr=nullptr, MCTargetOptions const *TargetOpts=nullptr, bool DoAutoReset=true, StringRef Swift5ReflSegmentName={})

void setDwarfDebugProducer(StringRef S)

Definition MCContext.h:810

LLVM_ABI std::optional< unsigned > getELFUniqueIDForEntsize(StringRef SectionName, unsigned Flags, unsigned EntrySize)

Return the unique ID of the section with the given name, flags and entry size, if it exists.

LLVM_ABI MCSymbol * createDirectionalLocalSymbol(unsigned LocalLabelVal)

Create the definition of a directional local symbol for numbered label (used for "1:" definitions).

LLVM_ABI void reportWarning(SMLoc L, const Twine &Msg)

uint16_t getDwarfVersion() const

Definition MCContext.h:817

std::function< void(const SMDiagnostic &, bool, const SourceMgr &, std::vector< const MDNode * > &)> DiagHandlerTy

Definition MCContext.h:86

const SourceMgr * getSourceManager() const

Definition MCContext.h:401

const SymbolTable & getSymbols() const

getSymbols - Get a reference for the symbol table for clients that want to, for example,...

Definition MCContext.h:518

const MCAsmInfo * getAsmInfo() const

Definition MCContext.h:412

StringMap< MCSymbolTableValue, BumpPtrAllocator & > SymbolTable

Definition MCContext.h:85

LLVM_ABI void finalizeDwarfSections(MCStreamer &MCOS)

Remove empty sections from SectionsForRanges, to avoid generating useless debug info for them.

void setSecureLog(std::unique_ptr< raw_fd_ostream > Value)

Definition MCContext.h:824

LLVM_ABI void reportError(SMLoc L, const Twine &Msg)

void addMCGenDwarfLabelEntry(const MCGenDwarfLabelEntry &E)

Definition MCContext.h:803

LLVM_ABI MCSymbol * getOrCreateLSDASymbol(const Twine &FuncName)

LLVM_ABI MCSectionDXContainer * getDXContainerSection(StringRef Section, SectionKind K)

Get the section for the provided Section name.

MCContext & operator=(const MCContext &)=delete

LLVM_ABI bool hasXCOFFSection(StringRef Section, XCOFF::CsectProperties CsectProp) const

void setMainFileName(StringRef S)

Set the main file name and override the default.

Definition MCContext.h:703

LLVM_ABI MCSymbol * getOrCreateSymbol(const Twine &Name)

Lookup the symbol inside with the specified Name.

SourceMgr * getInlineSourceManager()

Definition MCContext.h:404

LLVM_ABI MCSymbol * createLinkerPrivateSymbol(const Twine &Name)

bool isELF() const

Definition MCContext.h:393

void setGenDwarfFileNumber(unsigned FileNumber)

Definition MCContext.h:781

LLVM_ABI MCSectionSPIRV * getSPIRVSection()

LLVM_ABI MCSectionCOFF * getAssociativeCOFFSection(MCSectionCOFF *Sec, const MCSymbol *KeySym, unsigned UniqueID=MCSection::NonUniqueID)

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

LLVM_ABI MCSymbol * cloneSymbol(MCSymbol &Sym)

Clone a symbol for the .set directive, replacing it in the symbol table.

const MCTargetOptions * getTargetOptions() const

Definition MCContext.h:420

void setDwarfCompileUnitID(unsigned CUIndex)

Definition MCContext.h:737

const MCDwarfLineTable & getMCDwarfLineTable(unsigned CUID) const

Definition MCContext.h:721

LLVM_ABI MCSymbol * parseSymbol(const Twine &Name)

Variant of getOrCreateSymbol that handles backslash-escaped symbols.

LLVM_ABI EmitDwarfUnwindType emitDwarfUnwindInfo() const

LLVM_ABI bool isELFImplicitMergeableSectionNamePrefix(StringRef Name)

LLVM_ABI MCSectionELF * createELFGroupSection(const MCSymbolELF *Group, bool IsComdat)

void setUseNamesOnTempLabels(bool Value)

Definition MCContext.h:424

const MCDwarfLoc & getCurrentDwarfLoc()

Definition MCContext.h:773

LLVM_ABI void setGenDwarfRootFile(StringRef FileName, StringRef Buffer)

Specifies information about the "root file" for assembler clients (e.g., llvm-mc).

dwarf::DwarfFormat getDwarfFormat() const

Definition MCContext.h:814

const std::vector< MCGenDwarfLabelEntry > & getMCGenDwarfLabelEntries() const

Definition MCContext.h:799

StringRef getSecureLogFile()

Definition MCContext.h:821

MCSectionMachO * getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, SectionKind K, const char *BeginSymName=nullptr)

Definition MCContext.h:546

Environment

Definition MCContext.h:89

@ IsSPIRV

Definition MCContext.h:94

@ IsMachO

Definition MCContext.h:90

@ IsWasm

Definition MCContext.h:95

@ IsCOFF

Definition MCContext.h:93

@ IsXCOFF

Definition MCContext.h:96

@ IsGOFF

Definition MCContext.h:92

@ IsELF

Definition MCContext.h:91

@ IsDXContainer

Definition MCContext.h:97

std::vector< const MDNode * > & getLocInfos()

Definition MCContext.h:405

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.

Definition MCContext.h:741

LLVM_ABI MCSymbol * getDirectionalLocalSymbol(unsigned LocalLabelVal, bool Before)

Create and return a directional local symbol for numbered label (used for "1b" or 1f" references).

const MCSubtargetInfo * getSubtargetInfo() const

Definition MCContext.h:418

LLVM_ABI MCSymbol * createNamedTempSymbol()

Create a temporary symbol with a unique name whose name cannot be omitted in the symbol table.

const Triple & getTargetTriple() const

Definition MCContext.h:400

bool isMD5UsageConsistent() const

const SmallVectorImpl< std::string > & getMCDwarfDirs() const

void setRootFile(StringRef Directory, StringRef FileName, std::optional< MD5::MD5Result > Checksum, std::optional< StringRef > Source)

const SmallVectorImpl< MCDwarfFile > & getMCDwarfFiles() const

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

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

Instances of this class represent a label name in the MC file, and MCLabel are created and uniqued by...

MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...

This represents a section on Windows.

This represents a section on linux, lots of unix variants and some bare metal systems.

This represents a section on a Mach-O system (used by Mac OS X).

This represents a section on wasm.

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

static constexpr unsigned NonUniqueID

Streaming machine code generation interface.

Generic base class for all target subtargets.

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

Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...

Represents a location in source code.

SectionKind - This is a simple POD value that classifies the properties of a section.

A vector that has set insertion semantics.

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

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.

This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.

A BumpPtrAllocator that allows only elements of a specific type to be allocated.

StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...

StringMapIterBase< ValueTy, false > iterator

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

std::string str() const

str - Get the contents as an std::string.

Saves strings in the provided stable storage and returns a StringRef with a stable character pointer.

StringRef save(const char *S)

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.

A raw_ostream that writes to a file descriptor.

DwarfSectionSubtypeFlags

Values for defining the section subtype of sections of type STYP_DWARF as they would appear in the (s...

StorageMappingClass

Storage Mapping Class definitions.

DwarfFormat

Constants that define the DWARF format as 32 or 64 bit.

This is an optimization pass for GlobalISel generic memory operations.

StringMapEntry< MCSymbolTableValue > MCSymbolTableEntry

MCContext stores MCSymbolTableValue in a string map (see MCSymbol::operator new).

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

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