LLVM: include/llvm/CodeGen/DIE.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CODEGEN_DIE_H

14#define LLVM_CODEGEN_DIE_H

15

28#include

29#include

30#include

31#include

32#include

33#include <type_traits>

34#include

35#include

36

37namespace llvm {

38

47

48

49

51

53

54

56

57

58 int64_t Value = 0;

59

60public:

62 : Attribute(A), Form(F) {}

64 : Attribute(A), Form(dwarf::DW_FORM_implicit_const), Value(V) {}

65

66

67

70 int64_t getValue() const { return Value; }

71

72

73

75};

76

77

78

79

81

82 unsigned Number = 0;

83

84

86

87

88

89

90

91 bool Children;

92

93

95

96public:

98

99

100

102 unsigned getNumber() const { return Number; }

107

108

109

113

114

118

119

121 Data.push_back(AbbrevData);

122 }

123

124

126

127

129

132};

133

134

135

136

137

138

139

140

142

143

145

147

148 std::vector<DIEAbbrev *> Abbreviations;

149

150public:

153

154

155

156

157

158

159

161

162

164};

165

166

167

168

171

172public:

174

175

177 if (IsSigned) {

178 const int64_t SignedInt = Int;

179 if ((int8_t)Int == SignedInt)

180 return dwarf::DW_FORM_data1;

181 if ((int16_t)Int == SignedInt)

182 return dwarf::DW_FORM_data2;

183 if ((int32_t)Int == SignedInt)

184 return dwarf::DW_FORM_data4;

185 } else {

187 return dwarf::DW_FORM_data1;

189 return dwarf::DW_FORM_data2;

191 return dwarf::DW_FORM_data4;

192 }

193 return dwarf::DW_FORM_data8;

194 }

195

198

202

204};

205

206

207

210

211public:

213

214

216

220

222};

223

224

225

228

229public:

231

232

234

238

240};

241

242

243

247 static constexpr unsigned ULEB128PadSize = 4;

248

249public:

251 : CU(TheCU), Index(Idx) {}

252

253

255

257

260};

261

262

263

264

268

269public:

271

275

277};

278

279

280

281

282

285

286public:

288

289

291

295

297};

298

299

300

301

302

305

306public:

307 template

309

311

312

314

317

319};

320

321

322

323

324

326 DIE *Entry;

327

328public:

331

333

337

339};

340

341

342

343

345

346 size_t Index;

347

348public:

350

351

352 size_t getValue() const { return Index; }

353

357

359};

360

361

362

366

367public:

369 : Addr(Idx), Offset(Hi, Lo) {}

370

374

376};

377

378

379

380

381class DIEBlock;

382class DIELoc;

384public:

387#define HANDLE_DIEVALUE(T) is##T,

388#include "llvm/CodeGen/DIEValue.def"

389 };

390

391private:

392

396

397

398

399

400

401 using ValTy =

402 AlignedCharArrayUnion<DIEInteger, DIEString, DIEExpr, DIELabel,

403 DIEDelta *, DIEEntry, DIEBlock *, DIELoc *,

404 DIELocList, DIEBaseTypeRef *, DIEAddrOffset *>;

405

406 static_assert(sizeof(ValTy) <= sizeof(uint64_t) ||

407 sizeof(ValTy) <= sizeof(void *),

408 "Expected all large types to be stored via pointer");

409

410

411 ValTy Val;

412

413 template void construct(T V) {

414 static_assert(std::is_standard_layout::value ||

415 std::is_pointer::value,

416 "Expected standard layout or pointer");

417 new (reinterpret_cast<void *>(&Val)) T(V);

418 }

419

420 template T *get() { return reinterpret_cast<T *>(&Val); }

421 template const T *get() const {

422 return reinterpret_cast<const T *>(&Val);

423 }

424 template void destruct() { get()->~T(); }

425

426

427

428

429

430

431 void destroyVal() {

432 switch (Ty) {

434 return;

435#define HANDLE_DIEVALUE_SMALL(T) \

436 case is##T: \

437 destruct<DIE##T>(); \

438 return;

439#define HANDLE_DIEVALUE_LARGE(T) \

440 case is##T: \

441 destruct<const DIE##T *>(); \

442 return;

443#include "llvm/CodeGen/DIEValue.def"

444 }

445 }

446

447

448

449

450

451

452 void copyVal(const DIEValue &X) {

453 switch (Ty) {

455 return;

456#define HANDLE_DIEVALUE_SMALL(T) \

457 case is##T: \

458 construct<DIE##T>(*X.get<DIE##T>()); \

459 return;

460#define HANDLE_DIEVALUE_LARGE(T) \

461 case is##T: \

462 construct<const DIE##T *>(*X.get<const DIE##T *>()); \

463 return;

464#include "llvm/CodeGen/DIEValue.def"

465 }

466 }

467

468public:

470

474

476 if (this == &X)

477 return *this;

478 destroyVal();

479 Ty = X.Ty;

480 Attribute = X.Attribute;

481 Form = X.Form;

482 copyVal(X);

483 return *this;

484 }

485

487

488#define HANDLE_DIEVALUE_SMALL(T) \

489 DIEValue(dwarf::Attribute Attribute, dwarf::Form Form, const DIE##T &V) \

490 : Ty(is##T), Attribute(Attribute), Form(Form) { \

491 construct<DIE##T>(V); \

492 }

493#define HANDLE_DIEVALUE_LARGE(T) \

494 DIEValue(dwarf::Attribute Attribute, dwarf::Form Form, const DIE##T *V) \

495 : Ty(is##T), Attribute(Attribute), Form(Form) { \

496 assert(V && "Expected valid value"); \

497 construct<const DIE##T *>(V); \

498 }

499#include "llvm/CodeGen/DIEValue.def"

500

501

502

506 explicit operator bool() const { return Ty; }

507

508

509#define HANDLE_DIEVALUE_SMALL(T) \

510 const DIE##T &getDIE##T() const { \

511 assert(getType() == is##T && "Expected " #T); \

512 return *get<DIE##T>(); \

513 }

514#define HANDLE_DIEVALUE_LARGE(T) \

515 const DIE##T &getDIE##T() const { \

516 assert(getType() == is##T && "Expected " #T); \

517 return **get<const DIE##T *>(); \

518 }

519#include "llvm/CodeGen/DIEValue.def"

520

521

523

524

526

529};

530

533

535

537 return Next.getInt() ? nullptr : Next.getPointer();

538 }

539};

540

543

545

547

549 assert(N.Next.getPointer() == &N && "Expected unlinked node");

550 assert(N.Next.getInt() == true && "Expected unlinked node");

551

553 N.Next = Last->Next;

554 Last->Next.setPointerAndInt(&N, false);

555 }

557 }

558

560 assert(N.Next.getPointer() == &N && "Expected unlinked node");

561 assert(N.Next.getInt() == true && "Expected unlinked node");

562

564 N.Next.setPointerAndInt(Last->Next.getPointer(), false);

565 Last->Next.setPointerAndInt(&N, true);

566 } else {

568 }

569 }

570};

571

573public:

575

578

580 const T &back() const { return *static_cast<T *>(Last); }

582 return *static_cast<T *>(Last ? Last->Next.getPointer() : nullptr);

583 }

585 return *static_cast<T *>(Last ? Last->Next.getPointer() : nullptr);

586 }

587

589 if (Other.empty())

590 return;

591

592 T *FirstNode = static_cast<T *>(Other.Last->Next.getPointer());

593 T *IterNode = FirstNode;

594 do {

595

596 T *TmpNode = IterNode;

597 IterNode = static_cast<T *>(IterNode->Next.getPointer());

598

599

600 TmpNode->Next.setPointerAndInt(TmpNode, true);

602 } while (IterNode != FirstNode);

603

604 Other.Last = nullptr;

605 }

606

608 if (Last == &N) {

609 Last = Last->Next.getPointer();

610 Last->Next.setInt(true);

611 return true;

612 }

613

615 while (cur && cur->Next.getPointer()) {

616 if (cur->Next.getPointer() == &N) {

617 cur->Next.setPointer(cur->Next.getPointer()->Next.getPointer());

618 return true;

619 }

620 cur = cur->Next.getPointer();

621 }

622

623 return false;

624 }

625

630

631 Node *N = nullptr;

632

633 public:

636

638 N = N->getNext();

639 return *this;

640 }

641

642 explicit operator bool() const { return N; }

643 T &operator*() const { return *static_cast<T *>(N); }

644

646 };

647

650 const T> {

651 const Node *N = nullptr;

652

653 public:

655

658

660 N = N->getNext();

661 return *this;

662 }

663

664 explicit operator bool() const { return N; }

665 const T &operator*() const { return *static_cast<const T *>(N); }

666

668 };

669

671 return Last ? iterator(static_cast<T *>(Last->Next.getPointer())) : end();

672 }

673 const_iterator begin() const {

675 }

676 iterator end() { return iterator(); }

677 const_iterator end() const { return const_iterator(); }

678

680 static const_iterator toIterator(const T &N) { return const_iterator(&N); }

681};

682

683

684

685

686

687

688

689

690

691

692

693

694

695

696

697

701

702 explicit Node(DIEValue V) : V(V) {}

703 };

704

706

707 ListTy List;

708

709public:

713 std::forward_iterator_tag, DIEValue> {

715

716 using iterator_adaptor =

718 std::forward_iterator_tag, DIEValue>;

719

720 public:

723

726 };

727

729 const_value_iterator, ListTy::const_iterator,

730 std::forward_iterator_tag, const DIEValue> {

731 using iterator_adaptor =

733 std::forward_iterator_tag, const DIEValue>;

734

735 public:

740 : iterator_adaptor(X) {}

741

744 };

745

748

750 List.push_back(*new (Alloc) Node(V));

752 }

753 template

758

759

760 template

763 T &&NewValue) {

765 if (val.getAttribute() == Attribute) {

766 val = *new (Alloc)

767 DIEValue(NewAttribute, Form, std::forward(NewValue));

768 return true;

769 }

770 }

771

772 return false;

773 }

774

775 template

779 if (val.getAttribute() == Attribute) {

781 return true;

782 }

783 }

784

785 return false;

786 }

787

791 if (val.getAttribute() == Attribute) {

792 val = NewValue;

793 return true;

794 }

795 }

796

797 return false;

798 }

799

801

802 for (auto &node : List) {

803 if (node.V.getAttribute() == Attribute) {

804 return List.deleteNode(node);

805 }

806 }

807

808 return false;

809 }

810

811

812

813

815

823};

824

825

826

827

831

832

833 unsigned Offset = 0;

834

835 unsigned Size = 0;

836 unsigned AbbrevNumber = ~0u;

837

839

840

841 bool ForceChildren = false;

842

844

845

846

848

850

851public:

857

861

862

865

867

868 assert(Offset && "Offset being queried before it's been computed.");

869 return Offset;

870 }

872

873 assert(Size && "Size being queried before it's been ocmputed.");

874 return Size;

875 }

876 bool hasChildren() const { return ForceChildren || !Children.empty(); }

878

883

885 return make_range(Children.begin(), Children.end());

886 }

888 return make_range(Children.begin(), Children.end());

889 }

890

892

893

894

895

896

898

899

901

902

903

905

906

907

908

909

910

911

912

913

914

915

916

917

918

919

920

921

925

926

927

928

929

930

932

933

934

935

936

937

939

941 void setSize(unsigned S) { Size = S; }

942

943

945 assert(!Child->getParent() && "Child should be orphaned");

946 Child->Owner = this;

947 Children.push_back(*Child);

948 return Children.back();

949 }

950

952 assert(!Child->getParent() && "Child should be orphaned");

953 Child->Owner = this;

954 Children.push_front(*Child);

955 return Children.front();

956 }

957

958

959

960

961

963

966};

967

968

969

971

972

973

974

975

977

978

980 uint64_t Offset = 0;

981protected:

983

984public:

990

991

992

993

995 assert(!this->Section);

996 this->Section = Section;

997 }

998

1000 return nullptr;

1001 }

1002

1003

1004

1005

1011};

1012

1016

1017

1018

1019

1021 mutable unsigned Size = 0;

1022

1023public:

1025

1026

1028

1029

1031

1032

1033

1035 if (DwarfVersion > 3)

1036 return dwarf::DW_FORM_exprloc;

1037

1038 if ((uint8_t)Size == Size)

1039 return dwarf::DW_FORM_block1;

1041 return dwarf::DW_FORM_block2;

1043 return dwarf::DW_FORM_block4;

1044 return dwarf::DW_FORM_block;

1045 }

1046

1049

1051};

1052

1053

1054

1055

1057 mutable unsigned Size = 0;

1058

1059public:

1061

1062

1064

1065

1067

1068

1069

1071 if ((uint8_t)Size == Size)

1072 return dwarf::DW_FORM_block1;

1074 return dwarf::DW_FORM_block2;

1076 return dwarf::DW_FORM_block4;

1077 return dwarf::DW_FORM_block;

1078 }

1079

1082

1084};

1085

1086}

1087

1088#endif

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

This file defines the BumpPtrAllocator interface.

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

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

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

This file contains constants used for implementing Dwarf debug support.

This file defines a hash set that can be used to remove duplication of nodes in a graph.

This file defines the PointerIntPair class.

This file defines the PointerUnion class, which is a discriminated union of pointer types.

This file defines the SmallVector class.

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

This class is intended to be used as a driving class for all asm writers.

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

Dwarf abbreviation data, describes one attribute of a Dwarf abbreviation.

Definition DIE.h:50

dwarf::Form getForm() const

Definition DIE.h:69

dwarf::Attribute getAttribute() const

Accessors.

Definition DIE.h:68

DIEAbbrevData(dwarf::Attribute A, int64_t V)

Definition DIE.h:63

int64_t getValue() const

Definition DIE.h:70

DIEAbbrevData(dwarf::Attribute A, dwarf::Form F)

Definition DIE.h:61

Helps unique DIEAbbrev objects and assigns abbreviation numbers.

Definition DIE.h:141

LLVM_ABI void Emit(const AsmPrinter *AP, MCSection *Section) const

Print all abbreviations using the specified asm printer.

DIEAbbrevSet(BumpPtrAllocator &A)

Definition DIE.h:151

LLVM_ABI DIEAbbrev & uniqueAbbreviation(DIE &Die)

Generate the abbreviation declaration for a DIE and return a pointer to the generated abbreviation.

Dwarf abbreviation, describes the organization of a debug information object.

Definition DIE.h:80

LLVM_ABI void print(raw_ostream &O) const

void AddImplicitConstAttribute(dwarf::Attribute Attribute, int64_t Value)

Adds attribute with DW_FORM_implicit_const value.

Definition DIE.h:115

unsigned getNumber() const

Definition DIE.h:102

LLVM_ABI void Emit(const AsmPrinter *AP) const

Print the abbreviation using the specified asm printer.

void AddAttribute(dwarf::Attribute Attribute, dwarf::Form Form)

Adds another set of attribute information to the abbreviation.

Definition DIE.h:110

void AddAttribute(const DIEAbbrevData &AbbrevData)

Adds another set of attribute information to the abbreviation.

Definition DIE.h:120

const SmallVectorImpl< DIEAbbrevData > & getData() const

Definition DIE.h:104

DIEAbbrev(dwarf::Tag T, bool C)

Definition DIE.h:97

void setChildrenFlag(bool hasChild)

Definition DIE.h:105

dwarf::Tag getTag() const

Accessors.

Definition DIE.h:101

void setNumber(unsigned N)

Definition DIE.h:106

LLVM_ABI void dump() const

bool hasChildren() const

Definition DIE.h:103

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit label value.

DIEAddrOffset(uint64_t Idx, const MCSymbol *Hi, const MCSymbol *Lo)

Definition DIE.h:368

uint64_t getIndex() const

Definition DIE.h:259

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit base type reference.

LLVM_ABI void print(raw_ostream &O) const

DIEBaseTypeRef(const DwarfCompileUnit *TheCU, uint64_t Idx)

Definition DIE.h:250

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &, dwarf::Form) const

sizeOf - Determine size of the base type reference in bytes.

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &, dwarf::Form Form) const

sizeOf - Determine size of block data in bytes.

void setSize(unsigned size)

Definition DIE.h:1066

dwarf::Form BestForm() const

BestForm - Choose the best form for data.

Definition DIE.h:1070

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI void emitValue(const AsmPrinter *Asm, dwarf::Form Form) const

EmitValue - Emit block data.

LLVM_ABI unsigned computeSize(const dwarf::FormParams &FormParams) const

Calculate the size of the location expression.

A simple label difference DIE.

Definition DIE.h:265

DIEDelta(const MCSymbol *Hi, const MCSymbol *Lo)

Definition DIE.h:270

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

SizeOf - Determine size of delta value in bytes.

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit delta value.

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit debug information entry offset.

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

DIE & getEntry() const

Definition DIE.h:332

DIEEntry(DIE &E)

Definition DIE.h:330

LLVM_ABI void print(raw_ostream &O) const

const MCExpr * getValue() const

Get MCExpr.

Definition DIE.h:215

DIEExpr(const MCExpr *E)

Definition DIE.h:212

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit expression value.

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

SizeOf - Determine size of expression value in bytes.

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

~DIEInlineString()=default

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &, dwarf::Form) const

StringRef getString() const

Grab the string out of the object.

Definition DIE.h:313

DIEInlineString(StringRef Str, Allocator &A)

Definition DIE.h:308

An integer value DIE.

Definition DIE.h:169

DIEInteger(uint64_t I)

Definition DIE.h:173

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

sizeOf - Determine size of integer value in bytes.

uint64_t getValue() const

Definition DIE.h:196

void setValue(uint64_t Val)

Definition DIE.h:197

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI void emitValue(const AsmPrinter *Asm, dwarf::Form Form) const

EmitValue - Emit integer of appropriate size.

static dwarf::Form BestForm(bool IsSigned, uint64_t Int)

Choose the best form for integer.

Definition DIE.h:176

const MCSymbol * getValue() const

Get MCSymbol.

Definition DIE.h:233

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit label value.

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

sizeOf - Determine size of label value in bytes.

DIELabel(const MCSymbol *L)

Definition DIE.h:230

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

DIELocList(size_t I)

Definition DIE.h:349

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit label value.

size_t getValue() const

Grab the current index out.

Definition DIE.h:352

void setSize(unsigned size)

Definition DIE.h:1030

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &, dwarf::Form Form) const

sizeOf - Determine size of location data in bytes.

LLVM_ABI void emitValue(const AsmPrinter *Asm, dwarf::Form Form) const

EmitValue - Emit location data.

LLVM_ABI unsigned computeSize(const dwarf::FormParams &FormParams) const

Calculate the size of the location expression.

dwarf::Form BestForm(unsigned DwarfVersion) const

BestForm - Choose the best form for data.

Definition DIE.h:1034

LLVM_ABI void emitValue(const AsmPrinter *AP, dwarf::Form Form) const

EmitValue - Emit string value.

DIEString(DwarfStringPoolEntryRef S)

Definition DIE.h:287

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams, dwarf::Form Form) const

sizeOf - Determine size of delta value in bytes.

StringRef getString() const

Grab the string out of the object.

Definition DIE.h:290

Represents a compile or type unit.

Definition DIE.h:970

void setSection(MCSection *Section)

Set the section that this DIEUnit will be emitted into.

Definition DIE.h:994

void operator=(const DIEUnit &&RHS)=delete

DIEUnit(DIEUnit &&RHS)=delete

void operator=(const DIEUnit &RHS)=delete

const DIE & getUnitDie() const

Definition DIE.h:1010

DIEUnit(const DIEUnit &RHS)=delete

virtual const MCSymbol * getCrossSectionRelativeBaseAddress() const

Definition DIE.h:999

LLVM_ABI DIEUnit(dwarf::Tag UnitTag)

void setDebugSectionOffset(uint64_t O)

Definition DIE.h:1007

MCSection * getSection() const

Return the section that this DIEUnit will be emitted into.

Definition DIE.h:1006

DIE & getUnitDie()

Definition DIE.h:1009

virtual ~DIEUnit()=default

.debug_info or .debug_types absolute section offset.

uint64_t getDebugSectionOffset() const

Definition DIE.h:1008

const_value_iterator()=default

const DIEValue & operator*() const

Definition DIE.h:743

const_value_iterator(DIEValueList::value_iterator X)

Definition DIE.h:737

const_value_iterator(ListTy::const_iterator X)

Definition DIE.h:739

friend class const_value_iterator

Definition DIE.h:714

value_iterator(ListTy::iterator X)

Definition DIE.h:722

DIEValue & operator*() const

Definition DIE.h:725

A list of DIE values.

Definition DIE.h:698

bool deleteValue(dwarf::Attribute Attribute)

Definition DIE.h:800

void takeValues(DIEValueList &Other)

Take ownership of the nodes in Other, and append them to the back of the list.

Definition DIE.h:814

bool replaceValue(BumpPtrAllocator &Alloc, dwarf::Attribute Attribute, dwarf::Attribute NewAttribute, dwarf::Form Form, T &&NewValue)

Definition DIE.h:761

bool replaceValue(BumpPtrAllocator &Alloc, dwarf::Attribute Attribute, dwarf::Form Form, T &&NewValue)

Definition DIE.h:776

value_range values()

Definition DIE.h:816

iterator_range< value_iterator > value_range

Definition DIE.h:746

value_iterator addValue(BumpPtrAllocator &Alloc, const DIEValue &V)

Definition DIE.h:749

const_value_range values() const

Definition DIE.h:819

iterator_range< const_value_iterator > const_value_range

Definition DIE.h:747

value_iterator addValue(BumpPtrAllocator &Alloc, dwarf::Attribute Attribute, dwarf::Form Form, T &&Value)

Definition DIE.h:754

bool replaceValue(BumpPtrAllocator &Alloc, dwarf::Attribute Attribute, dwarf::Form Form, DIEValue &NewValue)

Definition DIE.h:788

LLVM_ABI void print(raw_ostream &O) const

LLVM_ABI void emitValue(const AsmPrinter *AP) const

Emit value via the Dwarf writer.

LLVM_ABI unsigned sizeOf(const dwarf::FormParams &FormParams) const

Return the size of a value in bytes.

dwarf::Form getForm() const

Definition DIE.h:505

Type getType() const

Accessors.

Definition DIE.h:503

~DIEValue()

Definition DIE.h:486

DIEValue(const DIEValue &X)

Definition DIE.h:471

DIEValue & operator=(const DIEValue &X)

Definition DIE.h:475

dwarf::Attribute getAttribute() const

Definition DIE.h:504

LLVM_ABI void dump() const

@ isNone

Definition DIE.h:386

A structured debug information entry.

Definition DIE.h:828

LLVM_ABI DIEValue findAttribute(dwarf::Attribute Attribute) const

Find a value in the DIE with the attribute given.

LLVM_ABI void print(raw_ostream &O, unsigned IndentCount=0) const

IntrusiveBackList< DIE >::const_iterator const_child_iterator

Definition DIE.h:880

unsigned getAbbrevNumber() const

Definition DIE.h:863

friend class DIEUnit

Definition DIE.h:830

unsigned getSize() const

Definition DIE.h:871

const_child_range children() const

Definition DIE.h:887

IntrusiveBackList< DIE >::iterator child_iterator

Definition DIE.h:879

DIE & addChild(DIE *Child)

Add a child to the DIE.

Definition DIE.h:944

DIE(const DIE &RHS)=delete

LLVM_ABI DIEAbbrev generateAbbrev() const

Generate the abbreviation for this DIE.

LLVM_ABI unsigned computeOffsetsAndAbbrevs(const dwarf::FormParams &FormParams, DIEAbbrevSet &AbbrevSet, unsigned CUOffset)

Compute the offset of this DIE and all its children.

DIE & addChildFront(DIE *Child)

Definition DIE.h:951

void setSize(unsigned S)

Definition DIE.h:941

static DIE * get(BumpPtrAllocator &Alloc, dwarf::Tag Tag)

Definition DIE.h:858

LLVM_ABI DIEUnit * getUnit() const

Climb up the parent chain to get the compile unit or type unit that this DIE belongs to.

child_range children()

Definition DIE.h:884

DIE & operator=(const DIE &RHS)=delete

LLVM_ABI const DIE * getUnitDie() const

Climb up the parent chain to get the compile unit or type unit DIE that this DIE belongs to.

void setAbbrevNumber(unsigned I)

Set the abbreviation number for this DIE.

Definition DIE.h:900

iterator_range< child_iterator > child_range

Definition DIE.h:881

unsigned getOffset() const

Get the compile/type unit relative offset of this DIE.

Definition DIE.h:866

void setOffset(unsigned O)

Definition DIE.h:940

void setForceChildren(bool B)

Definition DIE.h:877

bool hasChildren() const

Definition DIE.h:876

LLVM_ABI uint64_t getDebugSectionOffset() const

Get the absolute offset within the .debug_info or .debug_types section for this DIE.

iterator_range< const_child_iterator > const_child_range

Definition DIE.h:882

dwarf::Tag getTag() const

Definition DIE.h:864

LLVM_ABI void dump() const

DIE & operator=(const DIE &&RHS)=delete

LLVM_ABI DIE * getParent() const

DwarfStringPoolEntryRef: Dwarf string pool entry reference.

FoldingSetNodeID - This class is used to gather all the unique data bits of a node.

FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...

const T & operator*() const

Definition DIE.h:665

const_iterator(IntrusiveBackList< T >::iterator X)

Definition DIE.h:656

bool operator==(const const_iterator &X) const

Definition DIE.h:667

const_iterator & operator++()

Definition DIE.h:659

const_iterator(const T *N)

Definition DIE.h:657

T & operator*() const

Definition DIE.h:643

bool operator==(const iterator &X) const

Definition DIE.h:645

iterator & operator++()

Definition DIE.h:637

iterator(T *N)

Definition DIE.h:635

friend class const_iterator

Definition DIE.h:629

T & front()

Definition DIE.h:581

void takeNodes(IntrusiveBackList< T > &Other)

Definition DIE.h:588

const T & back() const

Definition DIE.h:580

iterator end()

Definition DIE.h:676

bool deleteNode(T &N)

Definition DIE.h:607

const T & front() const

Definition DIE.h:584

void push_front(T &N)

Definition DIE.h:577

iterator begin()

Definition DIE.h:670

void push_back(T &N)

Definition DIE.h:576

static const_iterator toIterator(const T &N)

Definition DIE.h:680

T & back()

Definition DIE.h:579

const_iterator begin() const

Definition DIE.h:673

const_iterator end() const

Definition DIE.h:677

static iterator toIterator(T &N)

Definition DIE.h:679

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

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

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

PointerIntPair - This class implements a pair of a pointer and small integer.

A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...

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.

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

LLVM Value Representation.

const ListTy::iterator & wrapped() const

iterator_adaptor_base()=default

CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...

A range adaptor for a pair of iterators.

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

This provides a very simple, boring adaptor for a begin and end iterator into a range type.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

@ C

The default llvm calling convention, compatible with C.

Calculates the starting offsets for various sections within the .debug_names section.

This is an optimization pass for GlobalISel generic memory operations.

auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)

Get the size of a range.

iterator_range< T > make_range(T x, T y)

Convenience function for iterating over sub-ranges.

FoldingSetBase::Node FoldingSetNode

OutputIt copy(R &&Range, OutputIt Out)

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

BasicDIEUnit(dwarf::Tag UnitTag)

Definition DIE.h:1014

Node * Last

Definition DIE.h:544

void push_back(Node &N)

Definition DIE.h:548

bool empty() const

Definition DIE.h:546

IntrusiveBackListNode Node

Definition DIE.h:542

void push_front(Node &N)

Definition DIE.h:559

PointerIntPair< IntrusiveBackListNode *, 1 > Next

Definition DIE.h:532

IntrusiveBackListNode * getNext() const

Definition DIE.h:536

IntrusiveBackListNode()

Definition DIE.h:534

A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...