summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-01-14 00:15:16 +0000
committerAdrian Prantl <aprantl@apple.com>2015-01-14 00:15:16 +0000
commit8efadbf868198022a2fe25fe2d9af9439cedae0b (patch)
treebfff185a58a5dd65c62fd85e814f53d1eea78a80
parent1411577ad9470eb282c998bc6ca3f85818f0ab91 (diff)
downloadbcm5719-llvm-8efadbf868198022a2fe25fe2d9af9439cedae0b.tar.gz
bcm5719-llvm-8efadbf868198022a2fe25fe2d9af9439cedae0b.zip
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
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 6901d2290e2..fe01980c812 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -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
OpenPOWER on IntegriCloud