mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Document, cleanup, and clang-format DwarfExpression.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225847 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -36,14 +36,18 @@ public:
 | 
				
			|||||||
  DwarfExpression(const AsmPrinter &AP) : AP(AP) {}
 | 
					  DwarfExpression(const AsmPrinter &AP) : AP(AP) {}
 | 
				
			||||||
  virtual ~DwarfExpression() {}
 | 
					  virtual ~DwarfExpression() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void EmitOp(uint8_t Op, const char* Comment = nullptr) = 0;
 | 
					  /// Output a dwarf operand and an optional assembler comment.
 | 
				
			||||||
 | 
					  virtual void EmitOp(uint8_t Op, const char *Comment = nullptr) = 0;
 | 
				
			||||||
 | 
					  /// Emit a raw signed value.
 | 
				
			||||||
  virtual void EmitSigned(int Value) = 0;
 | 
					  virtual void EmitSigned(int Value) = 0;
 | 
				
			||||||
 | 
					  /// Emit a raw unsigned value.
 | 
				
			||||||
  virtual void EmitUnsigned(unsigned Value) = 0;
 | 
					  virtual void EmitUnsigned(unsigned Value) = 0;
 | 
				
			||||||
 | 
					  /// Return whether the given machine register is the frame register in the
 | 
				
			||||||
 | 
					  /// current function.
 | 
				
			||||||
  virtual bool isFrameRegister(unsigned MachineReg) = 0;
 | 
					  virtual bool isFrameRegister(unsigned MachineReg) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Emit a dwarf register operation.
 | 
					  /// Emit a dwarf register operation.
 | 
				
			||||||
  void AddReg(int DwarfReg, const char* Comment = nullptr);
 | 
					  void AddReg(int DwarfReg, const char *Comment = nullptr);
 | 
				
			||||||
  /// Emit an (double-)indirect dwarf register operation.
 | 
					  /// Emit an (double-)indirect dwarf register operation.
 | 
				
			||||||
  void AddRegIndirect(int DwarfReg, int Offset, bool Deref = false);
 | 
					  void AddRegIndirect(int DwarfReg, int Offset, bool Deref = false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,13 +60,13 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  /// Emit an indirect dwarf register operation for the given machine register.
 | 
					  /// Emit an indirect dwarf register operation for the given machine register.
 | 
				
			||||||
  /// Returns false if no DWARF register exists for MachineReg.
 | 
					  /// Returns false if no DWARF register exists for MachineReg.
 | 
				
			||||||
  bool AddMachineRegIndirect(unsigned MachineReg, int Offset);
 | 
					  bool AddMachineRegIndirect(unsigned MachineReg, int Offset = 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// \brief Emit a partial DWARF register operation.
 | 
					  /// \brief Emit a partial DWARF register operation.
 | 
				
			||||||
  /// \param MLoc             the register
 | 
					  /// \param MachineReg        the register
 | 
				
			||||||
  /// \param PieceSize        size and
 | 
					  /// \param PieceSizeInBits   size and
 | 
				
			||||||
  /// \param PieceOffset      offset of the piece in bits, if this is one
 | 
					  /// \param PieceOffsetInBits offset of the piece in bits, if this is one
 | 
				
			||||||
  ///                         piece of an aggregate value.
 | 
					  ///                          piece of an aggregate value.
 | 
				
			||||||
  ///
 | 
					  ///
 | 
				
			||||||
  /// If size and offset is zero an operation for the entire
 | 
					  /// If size and offset is zero an operation for the entire
 | 
				
			||||||
  /// register is emitted: Some targets do not provide a DWARF
 | 
					  /// register is emitted: Some targets do not provide a DWARF
 | 
				
			||||||
@@ -70,8 +74,7 @@ public:
 | 
				
			|||||||
  /// function will attempt to emit a DWARF register by emitting a
 | 
					  /// function will attempt to emit a DWARF register by emitting a
 | 
				
			||||||
  /// piece of a super-register or by piecing together multiple
 | 
					  /// piece of a super-register or by piecing together multiple
 | 
				
			||||||
  /// subregisters that alias the register.
 | 
					  /// subregisters that alias the register.
 | 
				
			||||||
  void AddMachineRegPiece(unsigned MachineReg,
 | 
					  void AddMachineRegPiece(unsigned MachineReg, unsigned PieceSizeInBits = 0,
 | 
				
			||||||
                          unsigned PieceSizeInBits = 0,
 | 
					 | 
				
			||||||
                          unsigned PieceOffsetInBits = 0);
 | 
					                          unsigned PieceOffsetInBits = 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Emit a signed constant.
 | 
					  /// Emit a signed constant.
 | 
				
			||||||
@@ -89,12 +92,11 @@ public:
 | 
				
			|||||||
  DebugLocDwarfExpression(const AsmPrinter &AP, ByteStreamer &BS)
 | 
					  DebugLocDwarfExpression(const AsmPrinter &AP, ByteStreamer &BS)
 | 
				
			||||||
      : DwarfExpression(AP), BS(BS) {}
 | 
					      : DwarfExpression(AP), BS(BS) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void EmitOp(uint8_t Op, const char *Comment) override;
 | 
					  void EmitOp(uint8_t Op, const char *Comment = nullptr) override;
 | 
				
			||||||
  void EmitSigned(int Value) override;
 | 
					  void EmitSigned(int Value) override;
 | 
				
			||||||
  void EmitUnsigned(unsigned Value) override;
 | 
					  void EmitUnsigned(unsigned Value) override;
 | 
				
			||||||
  bool isFrameRegister(unsigned MachineReg) override;
 | 
					  bool isFrameRegister(unsigned MachineReg) override;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user