aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/MRegisterInfo.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-08-03 17:27:09 +0000
committerJim Laskey <jlaskey@mac.com>2006-08-03 17:27:09 +0000
commit6b59a36564782fccca39ec5d43ba202c012829aa (patch)
tree8451bc612bf8836633e3c3f4c5a7eb541ec4ef40 /lib/Target/MRegisterInfo.cpp
parent30f63adef8987a90e3bed62cbabb9cdcdd9c3f58 (diff)
Get darwin intel debugging up and running.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MRegisterInfo.cpp')
-rw-r--r--lib/Target/MRegisterInfo.cpp7
1 files changed, 6 insertions, 1 deletions
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<bool> 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