forked from OSchip/llvm-project
Debug Info: Don't bother emitting DW_AT_frame_base if the function has
no frame register. "Tested" via an assertion triggered by DwarfExpression. llvm-svn: 225858
This commit is contained in:
parent
1411577ad9
commit
8efadbf868
|
@ -295,7 +295,8 @@ DIE &DwarfCompileUnit::updateSubprogramScopeDIE(DISubprogram SP) {
|
|||
const TargetRegisterInfo *RI =
|
||||
Asm->TM.getSubtargetImpl()->getRegisterInfo();
|
||||
MachineLocation Location(RI->getFrameRegister(*Asm->MF));
|
||||
addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
|
||||
if (RI->isPhysicalRegister(Location.getReg()))
|
||||
addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
|
||||
}
|
||||
|
||||
// Add name to the name table, we do this here because we're guaranteed
|
||||
|
|
Loading…
Reference in New Issue