diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-10-09 00:11:39 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-10-09 00:11:39 +0000 |
commit | 524002004db54bbc504c3286c6ee649ba441e2f4 (patch) | |
tree | 69f432390157a35422d007c67a14d00af91713ff /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | b3f97ba815b8ccb794aa3836cfd135feb9d43da7 (diff) | |
download | bcm5719-llvm-524002004db54bbc504c3286c6ee649ba441e2f4.tar.gz bcm5719-llvm-524002004db54bbc504c3286c6ee649ba441e2f4.zip |
Sink DwarfDebug::addScopeRangeList down into DwarfCompileUnit
(& add a few accessors/make a couple of things public for this - it's a
bit of a toss-up, but I think I prefer it this way, keeping some more of
the meaty code down in DwarfCompileUnit - if only to make for smaller
implementation files, etc)
I think we could simplify range handling a bit if we removed the range
lists from each unit and just put a single range list on DwarfDebug,
similar to address pooling.
llvm-svn: 219370
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 0b2a2ff8263..d047322b995 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -349,11 +349,6 @@ class DwarfDebug : public AsmPrinterHandler { void ensureAbstractVariableIsCreatedIfScoped(const DIVariable &Var, const MDNode *Scope); - /// \brief A helper function to construct a RangeSpanList for a given - /// lexical scope. - void addScopeRangeList(DwarfCompileUnit &TheCU, DIE &ScopeDIE, - const SmallVectorImpl<InsnRange> &Range); - DIE *createAndAddScopeChildren(DwarfCompileUnit &TheCU, LexicalScope *Scope, DIE &ScopeDIE); /// \brief Construct a DIE for this abstract scope. @@ -518,17 +513,11 @@ class DwarfDebug : public AsmPrinterHandler { LabelsBeforeInsn.insert(std::make_pair(MI, nullptr)); } - /// \brief Return Label preceding the instruction. - MCSymbol *getLabelBeforeInsn(const MachineInstr *MI); - /// \brief Ensure that a label will be emitted after MI. void requestLabelAfterInsn(const MachineInstr *MI) { LabelsAfterInsn.insert(std::make_pair(MI, nullptr)); } - /// \brief Return Label immediately following the instruction. - MCSymbol *getLabelAfterInsn(const MachineInstr *MI); - void attachRangesOrLowHighPC(DwarfCompileUnit &Unit, DIE &D, const SmallVectorImpl<InsnRange> &Ranges); @@ -602,6 +591,9 @@ public: /// Returns the section symbol for the .debug_str section. MCSymbol *getDebugStrSym() const { return DwarfStrSectionSym; } + /// Returns the section symbol for the .debug_ranges section. + MCSymbol *getRangeSectionSym() const { return DwarfDebugRangeSectionSym; } + /// Returns the previous CU that was being updated const DwarfCompileUnit *getPrevCU() const { return PrevCU; } void setPrevCU(const DwarfCompileUnit *PrevCU) { this->PrevCU = PrevCU; } @@ -688,6 +680,14 @@ public: DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope, SmallVectorImpl<std::unique_ptr<DIE>> &Children, unsigned *ChildScopeCount = nullptr); + + /// \brief Return Label preceding the instruction. + MCSymbol *getLabelBeforeInsn(const MachineInstr *MI); + + /// \brief Return Label immediately following the instruction. + MCSymbol *getLabelAfterInsn(const MachineInstr *MI); + + unsigned getNextRangeNumber() { return GlobalRangeCount++; } }; } // End of namespace llvm |