diff options
| author | Adrian Prantl <aprantl@apple.com> | 2014-10-01 18:10:54 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2014-10-01 18:10:54 +0000 |
| commit | b458dc2eeed72df3985f9bd63c3dd633004801ea (patch) | |
| tree | 68c99cdd1181e9fee6602b462834c65060418992 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | |
| parent | af11fdba0ae7f09054e71744b454c6e1fd47cf7c (diff) | |
| download | bcm5719-llvm-b458dc2eeed72df3985f9bd63c3dd633004801ea.tar.gz bcm5719-llvm-b458dc2eeed72df3985f9bd63c3dd633004801ea.zip | |
Revert r218778 while investigating buldbot breakage.
"Move the complex address expression out of DIVariable and into an extra"
llvm-svn: 218782
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 1432ecd58ae..80f81853ddd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -70,7 +70,6 @@ public: /// \brief This class is used to track local variable information. class DbgVariable { DIVariable Var; // Variable Descriptor. - DIExpression Expr; // Complex address location expression. DIE *TheDIE; // Variable DIE. unsigned DotDebugLocOffset; // Offset in DotDebugLocEntries. const MachineInstr *MInsn; // DBG_VALUE instruction of the variable. @@ -79,22 +78,18 @@ class DbgVariable { public: /// Construct a DbgVariable from a DIVariable. - DbgVariable(DIVariable V, DIExpression E, DwarfDebug *DD) - : Var(V), Expr(E), TheDIE(nullptr), DotDebugLocOffset(~0U), - MInsn(nullptr), FrameIndex(~0), DD(DD) { - assert(Var.Verify() && Expr.Verify()); - } + DbgVariable(DIVariable V, DwarfDebug *DD) + : Var(V), TheDIE(nullptr), DotDebugLocOffset(~0U), MInsn(nullptr), + FrameIndex(~0), DD(DD) {} /// Construct a DbgVariable from a DEBUG_VALUE. /// AbstractVar may be NULL. DbgVariable(const MachineInstr *DbgValue, DwarfDebug *DD) - : Var(DbgValue->getDebugVariable()), Expr(DbgValue->getDebugExpression()), - TheDIE(nullptr), DotDebugLocOffset(~0U), MInsn(DbgValue), - FrameIndex(~0), DD(DD) {} + : Var(DbgValue->getDebugVariable()), TheDIE(nullptr), + DotDebugLocOffset(~0U), MInsn(DbgValue), FrameIndex(~0), DD(DD) {} // Accessors. DIVariable getVariable() const { return Var; } - DIExpression getExpression() const { return Expr; } void setDIE(DIE &D) { TheDIE = &D; } DIE *getDIE() const { return TheDIE; } void setDotDebugLocOffset(unsigned O) { DotDebugLocOffset = O; } @@ -129,14 +124,14 @@ public: bool variableHasComplexAddress() const { assert(Var.isVariable() && "Invalid complex DbgVariable!"); - return Expr.getNumElements() > 0; + return Var.hasComplexAddress(); } bool isBlockByrefVariable() const; unsigned getNumAddrElements() const { assert(Var.isVariable() && "Invalid complex DbgVariable!"); - return Expr.getNumElements(); + return Var.getNumAddrElements(); } - uint64_t getAddrElement(unsigned i) const { return Expr.getElement(i); } + uint64_t getAddrElement(unsigned i) const { return Var.getAddrElement(i); } DIType getType() const; private: |

