diff options
author | Carlo Kok <ck@remobjects.com> | 2013-08-02 16:14:15 +0000 |
---|---|---|
committer | Carlo Kok <ck@remobjects.com> | 2013-08-02 16:14:15 +0000 |
commit | fdabd9f391c1c32c8800d1a07b03604b4a00ef3b (patch) | |
tree | 111b366b7c0fa282a01623a38e8587d9d5b4cdb4 /lib/CodeGen | |
parent | e57343b6365df5b7318c5076f917ad40cf621555 (diff) | |
download | external_llvm-fdabd9f391c1c32c8800d1a07b03604b4a00ef3b.zip external_llvm-fdabd9f391c1c32c8800d1a07b03604b4a00ef3b.tar.gz external_llvm-fdabd9f391c1c32c8800d1a07b03604b4a00ef3b.tar.bz2 |
Bugfix for making the DWARF debug strings and labels to code emitted as secrel32 instead of long opcodes (only for coff). This makes them debuggable with GDB (with fix for 64bits msvc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 748259e..0c59286 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1416,6 +1416,10 @@ void AsmPrinter::EmitLabelOffsetDifference(const MCSymbol *Hi, uint64_t Offset, void AsmPrinter::EmitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset, unsigned Size) const { + if (MAI->needsDwarfSectionOffsetDirective() && Size == 4) { // secrel32 ONLY works for 32bits. + OutStreamer.EmitCOFFSecRel32(Label); + return; + } // Emit Label+Offset (or just Label if Offset is zero) const MCExpr *Expr = MCSymbolRefExpr::Create(Label, OutContext); |