summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
index 18bedf0b902..1f7b89fe5fc 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
@@ -27,7 +27,7 @@ namespace llvm {
class AsmPrinter;
class APInt;
class ByteStreamer;
-class DwarfCompileUnit;
+class DwarfUnit;
class DIELoc;
class TargetRegisterInfo;
@@ -104,8 +104,6 @@ protected:
const char *Comment;
};
- DwarfCompileUnit &CU;
-
/// The register location, if any.
SmallVector<Register, 2> DwarfRegs;
@@ -139,8 +137,6 @@ protected:
/// Emit a raw unsigned value.
virtual void emitUnsigned(uint64_t Value) = 0;
- virtual void emitBaseTypeRef(uint64_t Idx) = 0;
-
/// Emit a normalized unsigned constant.
void emitConstu(uint64_t Value);
@@ -203,8 +199,7 @@ protected:
~DwarfExpression() = default;
public:
- DwarfExpression(unsigned DwarfVersion, DwarfCompileUnit &CU)
- : CU(CU), DwarfVersion(DwarfVersion) {}
+ DwarfExpression(unsigned DwarfVersion) : DwarfVersion(DwarfVersion) {}
/// This needs to be called last to commit any pending changes.
void finalize();
@@ -252,9 +247,6 @@ public:
/// If applicable, emit an empty DW_OP_piece / DW_OP_bit_piece to advance to
/// the fragment described by \c Expr.
void addFragmentOffset(const DIExpression *Expr);
-
- void emitLegacySExt(unsigned FromBits);
- void emitLegacyZExt(unsigned FromBits);
};
/// DwarfExpression implementation for .debug_loc entries.
@@ -264,28 +256,27 @@ class DebugLocDwarfExpression final : public DwarfExpression {
void emitOp(uint8_t Op, const char *Comment = nullptr) override;
void emitSigned(int64_t Value) override;
void emitUnsigned(uint64_t Value) override;
- void emitBaseTypeRef(uint64_t Idx) override;
bool isFrameRegister(const TargetRegisterInfo &TRI,
unsigned MachineReg) override;
public:
- DebugLocDwarfExpression(unsigned DwarfVersion, ByteStreamer &BS, DwarfCompileUnit &CU)
- : DwarfExpression(DwarfVersion, CU), BS(BS) {}
+ DebugLocDwarfExpression(unsigned DwarfVersion, ByteStreamer &BS)
+ : DwarfExpression(DwarfVersion), BS(BS) {}
};
/// DwarfExpression implementation for singular DW_AT_location.
class DIEDwarfExpression final : public DwarfExpression {
const AsmPrinter &AP;
+ DwarfUnit &DU;
DIELoc &DIE;
void emitOp(uint8_t Op, const char *Comment = nullptr) override;
void emitSigned(int64_t Value) override;
void emitUnsigned(uint64_t Value) override;
- void emitBaseTypeRef(uint64_t Idx) override;
bool isFrameRegister(const TargetRegisterInfo &TRI,
unsigned MachineReg) override;
public:
- DIEDwarfExpression(const AsmPrinter &AP, DwarfCompileUnit &CU, DIELoc &DIE);
+ DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU, DIELoc &DIE);
DIELoc *finalize() {
DwarfExpression::finalize();
OpenPOWER on IntegriCloud