diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-01-12 23:36:56 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-01-12 23:36:56 +0000 |
commit | a4c30d6509260cce67904710bccb3cd07d396971 (patch) | |
tree | 54c2a26b67855a0a838e4d852a7d9fa323c93bdc /llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | |
parent | 9cffbd8daa9504579d1acc814e30c852745d5559 (diff) | |
download | bcm5719-llvm-a4c30d6509260cce67904710bccb3cd07d396971.tar.gz bcm5719-llvm-a4c30d6509260cce67904710bccb3cd07d396971.zip |
Make DwarfExpression store the AsmPrinter instead of the TargetMachine.
NFC.
llvm-svn: 225731
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index 9a3377a49b6..d3131541eb3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -37,8 +37,8 @@ class DebugLocDwarfExpression : public DwarfExpression { ByteStreamer &BS; public: - DebugLocDwarfExpression(TargetMachine &TM, ByteStreamer &BS) - : DwarfExpression(TM), BS(BS) {} + DebugLocDwarfExpression(const AsmPrinter &AP, ByteStreamer &BS) + : DwarfExpression(AP), BS(BS) {} void EmitOp(uint8_t Op, const char *Comment) override; void EmitSigned(int Value) override; @@ -222,14 +222,14 @@ void AsmPrinter::EmitDwarfRegOpPiece(ByteStreamer &Streamer, unsigned PieceSizeInBits, unsigned PieceOffsetInBits) const { assert(MLoc.isReg() && "MLoc must be a register"); - DebugLocDwarfExpression Expr(TM, Streamer); + DebugLocDwarfExpression Expr(*this, Streamer); Expr.AddMachineRegPiece(MLoc.getReg(), PieceSizeInBits, PieceOffsetInBits); } void AsmPrinter::EmitDwarfOpPiece(ByteStreamer &Streamer, unsigned PieceSizeInBits, unsigned PieceOffsetInBits) const { - DebugLocDwarfExpression Expr(TM, Streamer); + DebugLocDwarfExpression Expr(*this, Streamer); Expr.AddOpPiece(PieceSizeInBits, PieceOffsetInBits); } @@ -237,7 +237,7 @@ void AsmPrinter::EmitDwarfOpPiece(ByteStreamer &Streamer, void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer, const MachineLocation &MLoc, bool Indirect) const { - DebugLocDwarfExpression Expr(TM, Streamer); + DebugLocDwarfExpression Expr(*this, Streamer); const TargetRegisterInfo *TRI = TM.getSubtargetImpl()->getRegisterInfo(); int Reg = TRI->getDwarfRegNum(MLoc.getReg(), false); if (Reg < 0) { |