From 6b59a36564782fccca39ec5d43ba202c012829aa Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Thu, 3 Aug 2006 17:27:09 +0000 Subject: Get darwin intel debugging up and running. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29504 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/MRegisterInfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/Target/MRegisterInfo.cpp') diff --git a/lib/Target/MRegisterInfo.cpp b/lib/Target/MRegisterInfo.cpp index 920bb5d3af..eb58a3a059 100644 --- a/lib/Target/MRegisterInfo.cpp +++ b/lib/Target/MRegisterInfo.cpp @@ -11,7 +11,9 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/MRegisterInfo.h" +#include "llvm/Target/TargetFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" @@ -50,9 +52,12 @@ std::vector MRegisterInfo::getAllocatableSet(MachineFunction &MF) const { /// variables and then call MRegisterInfo::getLocation for the default action. void MRegisterInfo::getLocation(MachineFunction &MF, unsigned Index, MachineLocation &ML) const { + const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo(); MachineFrameInfo *MFI = MF.getFrameInfo(); ML.set(getFrameRegister(MF), - MFI->getObjectOffset(Index) + MFI->getStackSize()); + MFI->getObjectOffset(Index) + + MFI->getStackSize() - + TFI.getOffsetOfLocalArea()); } /// getInitialFrameState - Returns a list of machine moves that are assumed -- cgit v1.2.3-70-g09d2