llvm.org GIT mirror llvm / 7841554
Debug Info: Turn DIExpression::getFrameRegister() into an isFrameRegister() function. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225846 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 5 years ago
4 changed file(s) with 9 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
4545 BS.EmitULEB128(Value, Twine(Value));
4646 }
4747
48 unsigned DebugLocDwarfExpression::getFrameRegister() {
49 llvm_unreachable("not available");
48 bool DebugLocDwarfExpression::isFrameRegister(unsigned MachineReg) {
49 // This information is not available while emitting .debug_loc entries.
50 return false;
5051 }
5152
5253 //===----------------------------------------------------------------------===//
7878 if (DwarfReg < 0)
7979 return false;
8080
81 if (MachineReg == getFrameRegister()) {
81 if (isFrameRegister(MachineReg)) {
8282 // If variable offset is based in frame register then use fbreg.
8383 EmitOp(dwarf::DW_OP_fbreg);
8484 EmitSigned(Offset);
3939 virtual void EmitSigned(int Value) = 0;
4040 virtual void EmitUnsigned(unsigned Value) = 0;
4141
42 virtual unsigned getFrameRegister() = 0;
42 virtual bool isFrameRegister(unsigned MachineReg) = 0;
4343
4444 /// Emit a dwarf register operation.
4545 void AddReg(int DwarfReg, const char* Comment = nullptr);
9191 void EmitOp(uint8_t Op, const char *Comment) override;
9292 void EmitSigned(int Value) override;
9393 void EmitUnsigned(unsigned Value) override;
94 unsigned getFrameRegister() override;
94 bool isFrameRegister(unsigned MachineReg) override;
9595 };
9696
9797 }
5454 void EmitOp(uint8_t Op, const char* Comment = nullptr) override;
5555 void EmitSigned(int Value) override;
5656 void EmitUnsigned(unsigned Value) override;
57 unsigned getFrameRegister() override;
57 bool isFrameRegister(unsigned MachineReg) override;
5858 };
5959
6060 void DIEDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
6666 void DIEDwarfExpression::EmitUnsigned(unsigned Value) {
6767 DU.addUInt(DIE, dwarf::DW_FORM_udata, Value);
6868 }
69 unsigned DIEDwarfExpression::getFrameRegister() {
70 return getTRI()->getFrameRegister(*AP.MF);
69 bool DIEDwarfExpression::isFrameRegister(unsigned MachineReg) {
70 return MachineReg == getTRI()->getFrameRegister(*AP.MF);
7171 }
7272
7373