attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym);
- const TargetRegisterInfo *RI = Asm->TM.getSubtargetImpl()->getRegisterInfo();
- MachineLocation Location(RI->getFrameRegister(*Asm->MF));
- SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
+ // Only include DW_AT_frame_base in full debug info
+ if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) {
+ const TargetRegisterInfo *RI =
+ Asm->TM.getSubtargetImpl()->getRegisterInfo();
+ MachineLocation Location(RI->getFrameRegister(*Asm->MF));
+ SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
+ }
// Add name to the name table, we do this here because we're guaranteed
// to have concrete versions of our DW_TAG_subprogram nodes.
; CHECK: DW_TAG_subprogram
; CHECK-NEXT: DW_AT_low_pc
; CHECK-NEXT: DW_AT_high_pc
-; FIXME: We don't need the DW_AT_frame_base for -gmlt.
-; CHECK-NEXT: DW_AT_frame_base
; CHECK-NEXT: DW_AT_name
; CHECK-NOT: DW_AT
; CHECK: {{DW_TAG|NULL}}