Used the cached subtarget off of the MachineFunction.

llvm-svn: 230078
This commit is contained in:
Eric Christopher 2015-02-20 22:36:11 +00:00
parent b38ef8c2b6
commit d4e723f2cf
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.