diff options
author | Eric Christopher <echristo@gmail.com> | 2013-11-16 00:18:40 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-11-16 00:18:40 +0000 |
commit | 87fd14d9b52079828c5db4e1e4878046a7488f81 (patch) | |
tree | 855cdb247168924efa7da1785146d3ddd642e45e /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 7b8677109452dc3f106f931edab2d1ccaf1d06b1 (diff) | |
download | llvm-87fd14d9b52079828c5db4e1e4878046a7488f81.tar.gz llvm-87fd14d9b52079828c5db4e1e4878046a7488f81.tar.bz2 llvm-87fd14d9b52079828c5db4e1e4878046a7488f81.tar.xz |
For dwarf4 use the correct form for referencing debug_loc locations,
and update test cases accordingly.
This doesn't affect the output dumped using llvm-dwarfdump, but
readelf does now dump the debug_loc section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index f8b2609396..20e61cd4c9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2118,7 +2118,7 @@ void DwarfDebug::emitDIE(DIE *Die, ArrayRef<DIEAbbrev *> Abbrevs) { case dwarf::DW_AT_location: { if (DIELabel *L = dyn_cast<DIELabel>(Values[i])) { if (Asm->MAI->doesDwarfUseRelocationsAcrossSections()) - Asm->EmitLabelReference(L->getValue(), 4); + Asm->EmitSectionOffset(L->getValue(), DwarfDebugLocSectionSym); else Asm->EmitLabelDifference(L->getValue(), DwarfDebugLocSectionSym, 4); } else { |