summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorKeno Fischer <kfischer@college.harvard.edu>2017-01-02 03:00:19 +0000
committerKeno Fischer <kfischer@college.harvard.edu>2017-01-02 03:00:19 +0000
commitf7d84ee6ff35c6bfe950bbf451c3e84ef23c194f (patch)
treea0f906023142187e040db3b68eeb7a5a3f72a703 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentefcfe860723bc611b555d8d1db8c75405807b367 (diff)
downloadbcm5719-llvm-f7d84ee6ff35c6bfe950bbf451c3e84ef23c194f.tar.gz
bcm5719-llvm-f7d84ee6ff35c6bfe950bbf451c3e84ef23c194f.zip
Reapply "[CodeGen] Fix invalid DWARF info on Win64"
This reapplies rL289013 (reverted in rL289014) with the fixes identified in D21731. Should hopefully pass the buildbots this time. llvm-svn: 290809
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index f0537e04165..de0a4f0befa 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1689,7 +1689,9 @@ void AsmPrinter::EmitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset,
unsigned Size,
bool IsSectionRelative) const {
if (MAI->needsDwarfSectionOffsetDirective() && IsSectionRelative) {
- OutStreamer->EmitCOFFSecRel32(Label);
+ OutStreamer->EmitCOFFSecRel32(Label, Offset);
+ if (Size > 4)
+ OutStreamer->EmitZeros(Size - 4);
return;
}
OpenPOWER on IntegriCloud