diff options
author | Carlo Kok <ck@remobjects.com> | 2013-08-13 17:45:53 +0000 |
---|---|---|
committer | Carlo Kok <ck@remobjects.com> | 2013-08-13 17:45:53 +0000 |
commit | e05a304e5af754e4f8b1f1a35e22ebf35f072995 (patch) | |
tree | 6c5a20ee8d0eb2ccb58ad4f01171dde9fdbb11c7 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | a036a31d94ec3984ae94bee302e0714b4c3e5abb (diff) | |
download | llvm-e05a304e5af754e4f8b1f1a35e22ebf35f072995.tar.gz llvm-e05a304e5af754e4f8b1f1a35e22ebf35f072995.tar.bz2 llvm-e05a304e5af754e4f8b1f1a35e22ebf35f072995.tar.xz |
For COFF only: dwarf debug info output a label reference as a section relative item only when it's one of dw_from strp, sec_offset, ref_addr or op_call_ref instead of going by size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 12c35747ee..d8a20f800b 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1415,9 +1415,9 @@ void AsmPrinter::EmitLabelOffsetDifference(const MCSymbol *Hi, uint64_t Offset, /// where the size in bytes of the directive is specified by Size and Label /// specifies the label. This implicitly uses .set if it is available. void AsmPrinter::EmitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset, - unsigned Size) + unsigned Size, bool IsSectionRelative) const { - if (MAI->needsDwarfSectionOffsetDirective() && Size == 4) { // secrel32 ONLY works for 32bits. + if (MAI->needsDwarfSectionOffsetDirective() && IsSectionRelative) { OutStreamer.EmitCOFFSecRel32(Label); return; } |