mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
AsmPrinter: Stop inheriting from DIE
Change `DIELoc` and `DIEBlock` to stop inheriting from `DIE`, instead inheriting from `DIEValueList` to share the value storage API. This awkward bit of code-sharing was also fairly confusing: neither `DIELoc` nor `DIEBlock` represents a `DIE`, so why would they inherit from it? Aside from the API cleanup, this should improve debug info memory usage in the backend, since it shaves five pointers off of every `DIELoc` and `DIEBlock`. I haven't bothered to measure the savings, though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
401c02a7ed
commit
5bb95798bc
@ -630,7 +630,6 @@ public:
|
||||
class DIE : IntrusiveBackListNode, public DIEValueList {
|
||||
friend class IntrusiveBackList<DIE>;
|
||||
|
||||
protected:
|
||||
/// Offset - Offset in debug info section.
|
||||
///
|
||||
unsigned Offset;
|
||||
@ -650,10 +649,7 @@ protected:
|
||||
|
||||
DIE *Parent = nullptr;
|
||||
|
||||
protected:
|
||||
DIE() : Offset(0), Size(0) {}
|
||||
|
||||
private:
|
||||
DIE() = delete;
|
||||
explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag) {}
|
||||
|
||||
public:
|
||||
@ -723,7 +719,7 @@ public:
|
||||
//===--------------------------------------------------------------------===//
|
||||
/// DIELoc - Represents an expression location.
|
||||
//
|
||||
class DIELoc : public DIE {
|
||||
class DIELoc : public DIEValueList {
|
||||
mutable unsigned Size; // Size in bytes excluding size header.
|
||||
|
||||
public:
|
||||
@ -759,7 +755,7 @@ public:
|
||||
//===--------------------------------------------------------------------===//
|
||||
/// DIEBlock - Represents a block of values.
|
||||
//
|
||||
class DIEBlock : public DIE {
|
||||
class DIEBlock : public DIEValueList {
|
||||
mutable unsigned Size; // Size in bytes excluding size header.
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user