summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-07 18:04:24 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-07 18:04:24 +0000
commitf7952d3a5f294b2c4a9e59e06edc927fddf37e78 (patch)
treef144bf8b842f6d456b7c8092e1a09a2830b48462 /lib
parentfc9031cdffa3063ef747bd3a98833f164d07fc4a (diff)
downloadllvm-f7952d3a5f294b2c4a9e59e06edc927fddf37e78.tar.gz
llvm-f7952d3a5f294b2c4a9e59e06edc927fddf37e78.tar.bz2
llvm-f7952d3a5f294b2c4a9e59e06edc927fddf37e78.tar.xz
DebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per spec
Code review feedback to r203187 from Oliver Stannard. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 84c486cf89..882720fcae 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -413,7 +413,7 @@ DIE *DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit *SPCU,
}
SPCU->addLabelAddress(SPDie, dwarf::DW_AT_low_pc, FunctionBeginSym);
- if (Triple(Asm->getTargetTriple()).isOSDarwin())
+ if (DwarfVersion < 4 || Triple(Asm->getTargetTriple()).isOSDarwin())
SPCU->addLabelAddress(SPDie, dwarf::DW_AT_high_pc, FunctionEndSym);
else
SPCU->addLabelDelta(SPDie, dwarf::DW_AT_high_pc, FunctionEndSym,