[CodeGen] Fix invalid DWARF info on Win64
authorKeno Fischer <kfischer@college.harvard.edu>
Thu, 8 Dec 2016 01:40:21 +0000 (01:40 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Thu, 8 Dec 2016 01:40:21 +0000 (01:40 +0000)
commit460218fb7d13132e4ea3def3b75eb43aa505b2db
tree0527e1c2d2e68010380ffda91cbb5c08bd3d8231
parent4574a890511d8bf7b9e7e3d59d9ad368ab79f843
[CodeGen] Fix invalid DWARF info on Win64

The relocations for `DIEEntry::EmitValue` were wrong for Win64
(emitting FK_Data_4 instead of FK_SecRel_4). This corrects that
oversight so that the DWARF data is correct in Win64 COFF files.

Fixes PR15393.

Patch by Jameson Nash <jameson@juliacomputing.com> based on a patch
by David Majnemer.

Differential Revision: https://reviews.llvm.org/D21731

llvm-svn: 289013
13 files changed:
llvm/docs/Extensions.rst
llvm/include/llvm/MC/MCStreamer.h
llvm/include/llvm/MC/MCWinCOFFStreamer.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCCodeView.cpp
llvm/lib/MC/MCParser/COFFAsmParser.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/MC/WinCOFFStreamer.cpp
llvm/test/DebugInfo/X86/ref_addr_relocation.ll