llvm.org GIT mirror llvm / 82df5a6
Document, cleanup, and clang-format DwarfExpression.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225847 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 5 years ago
1 changed file(s) with 14 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
3535 DwarfExpression(const AsmPrinter &AP) : AP(AP) {}
3636 virtual ~DwarfExpression() {}
3737
38 virtual void EmitOp(uint8_t Op, const char* Comment = nullptr) = 0;
38 /// Output a dwarf operand and an optional assembler comment.
39 virtual void EmitOp(uint8_t Op, const char *Comment = nullptr) = 0;
40 /// Emit a raw signed value.
3941 virtual void EmitSigned(int Value) = 0;
42 /// Emit a raw unsigned value.
4043 virtual void EmitUnsigned(unsigned Value) = 0;
41
44 /// Return whether the given machine register is the frame register in the
45 /// current function.
4246 virtual bool isFrameRegister(unsigned MachineReg) = 0;
4347
4448 /// Emit a dwarf register operation.
45 void AddReg(int DwarfReg, const char* Comment = nullptr);
49 void AddReg(int DwarfReg, const char *Comment = nullptr);
4650 /// Emit an (double-)indirect dwarf register operation.
4751 void AddRegIndirect(int DwarfReg, int Offset, bool Deref = false);
4852
5559
5660 /// Emit an indirect dwarf register operation for the given machine register.
5761 /// Returns false if no DWARF register exists for MachineReg.
58 bool AddMachineRegIndirect(unsigned MachineReg, int Offset);
62 bool AddMachineRegIndirect(unsigned MachineReg, int Offset = 0);
5963
6064 /// \brief Emit a partial DWARF register operation.
61 /// \param MLoc the register
62 /// \param PieceSize size and
63 /// \param PieceOffset offset of the piece in bits, if this is one
64 /// piece of an aggregate value.
65 /// \param MachineReg the register
66 /// \param PieceSizeInBits size and
67 /// \param PieceOffsetInBits offset of the piece in bits, if this is one
68 /// piece of an aggregate value.
6569 ///
6670 /// If size and offset is zero an operation for the entire
6771 /// register is emitted: Some targets do not provide a DWARF
6973 /// function will attempt to emit a DWARF register by emitting a
7074 /// piece of a super-register or by piecing together multiple
7175 /// subregisters that alias the register.
72 void AddMachineRegPiece(unsigned MachineReg,
73 unsigned PieceSizeInBits = 0,
76 void AddMachineRegPiece(unsigned MachineReg, unsigned PieceSizeInBits = 0,
7477 unsigned PieceOffsetInBits = 0);
7578
7679 /// Emit a signed constant.
8891 DebugLocDwarfExpression(const AsmPrinter &AP, ByteStreamer &BS)
8992 : DwarfExpression(AP), BS(BS) {}
9093
91 void EmitOp(uint8_t Op, const char *Comment) override;
94 void EmitOp(uint8_t Op, const char *Comment = nullptr) override;
9295 void EmitSigned(int Value) override;
9396 void EmitUnsigned(unsigned Value) override;
9497 bool isFrameRegister(unsigned MachineReg) override;
9598 };
96
9799 }
98100
99101 #endif