Used the cached subtarget off of the MachineFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230078 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2015-02-20 22:36:11 +00:00
parent 4b91be0289
commit f50c34aa13
2 changed files with 3 additions and 5 deletions

View File

@ -292,8 +292,7 @@ DIE &DwarfCompileUnit::updateSubprogramScopeDIE(DISubprogram SP) {
// Only include DW_AT_frame_base in full debug info
if (!includeMinimalInlineScopes()) {
const TargetRegisterInfo *RI =
Asm->TM.getSubtargetImpl()->getRegisterInfo();
const TargetRegisterInfo *RI = Asm->MF->getSubtarget().getRegisterInfo();
MachineLocation Location(RI->getFrameRegister(*Asm->MF));
if (RI->isPhysicalRegister(Location.getReg()))
addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
@ -524,8 +523,7 @@ DwarfCompileUnit::constructVariableDIEImpl(const DbgVariable &DV,
DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc);
for (auto FI : DV.getFrameIndex()) {
unsigned FrameReg = 0;
const TargetFrameLowering *TFI =
Asm->TM.getSubtargetImpl()->getFrameLowering();
const TargetFrameLowering *TFI = Asm->MF->getSubtarget().getFrameLowering();
int Offset = TFI->getFrameIndexReference(*Asm->MF, FI, FrameReg);
assert(Expr != DV.getExpression().end() &&
"Wrong number of expressions");

View File

@ -1176,7 +1176,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
Asm->OutStreamer.EmitLabel(FunctionBeginSym);
// Calculate history for local variables.
calculateDbgValueHistory(MF, Asm->TM.getSubtargetImpl()->getRegisterInfo(),
calculateDbgValueHistory(MF, Asm->MF->getSubtarget().getRegisterInfo(),
DbgValues);
// Request labels for the full history.