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 | afcc62024ed3ce8f30284ab3858e3cb4d141961e (patch) | |
tree | 35caef122f3dce1431d42e0c56a7f034ccc17af1 /llvm/lib/CodeGen | |
parent | f479b74a9526b07120a4203c0bc7b27fc21f983f (diff) | |
download | bcm5719-llvm-afcc62024ed3ce8f30284ab3858e3cb4d141961e.tar.gz bcm5719-llvm-afcc62024ed3ce8f30284ab3858e3cb4d141961e.zip |
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
llvm-svn: 187597
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 748259e298a..650acab757e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/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); |