diff options
author | Carlo Kok <ck@remobjects.com> | 2013-08-01 18:38:14 +0000 |
---|---|---|
committer | Carlo Kok <ck@remobjects.com> | 2013-08-01 18:38:14 +0000 |
commit | 5b25082ddb88a3fdedcd3841d5f397402fcd3be4 (patch) | |
tree | 61f5403be106ca33def6a74a439f5523e7869d51 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | a4cbd78af84b76f92202f2f2b1a3c49ff1f85798 (diff) | |
download | external_llvm-5b25082ddb88a3fdedcd3841d5f397402fcd3be4.zip external_llvm-5b25082ddb88a3fdedcd3841d5f397402fcd3be4.tar.gz external_llvm-5b25082ddb88a3fdedcd3841d5f397402fcd3be4.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.
fixes Bug 16249 - LLVM generates broken debug info on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187597 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, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 748259e..650acab 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()) { + OutStreamer.EmitCOFFSecRel32(Label); + return; + } // Emit Label+Offset (or just Label if Offset is zero) const MCExpr *Expr = MCSymbolRefExpr::Create(Label, OutContext); |