From 72bebb9205c1628601b052d25555aabe6e15e6f4 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 31 Jan 2008 03:37:28 +0000 Subject: MRegisterInfo::getLocation() is a really bad idea. Its function is to calculate the offset from frame pointer to a stack slot and then storing the delta in a MachineLocation object. The name is bad (it implies a getter), and MRegisterInfo doesn't need to know about MachineLocation. Replace getLocation() with getFrameIndexOffset() which returns the delta from frame pointer to stack slot. Dwarf writer can then use the information for whatever it wants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46597 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/DwarfWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen') diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 1068f68991..de5709622b 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -1875,7 +1875,8 @@ private: // Add variable address. MachineLocation Location; - RI->getLocation(*MF, DV->getFrameIndex(), Location); + Location.set(RI->getFrameRegister(*MF), + RI->getFrameIndexOffset(*MF, DV->getFrameIndex())); AddAddress(VariableDie, DW_AT_location, Location); return VariableDie; -- cgit v1.2.3-70-g09d2