Rename and improve emitSectionOffset.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 16 Jun 2015 23:22:02 +0000 (23:22 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 16 Jun 2015 23:22:02 +0000 (23:22 +0000)
commit3fea1651f60f5095b460f7b6cfb7952292d10653
tree620d10ba1af511a21bc8ae5eb074e0622fdd491d
parent363eaff04906d61af1f9d67d76a1be3029397c65
Rename and improve emitSectionOffset.

Different object formats represent references from dwarf in different ways.

ELF uses a relocation to the referenced point (except for .dwo) and
COFF/MachO use the offset of the referenced point inside its section.

This patch renames emitSectionOffset because

* It doesn't produce an offset on ELF.
* It changes behavior depending on how DWARF is represented, so adding
dwarf to its name is probably a good thing.

The patch also adds an option to force the use of offsets.That avoids
funny looking code like

  if (!UseOffsets)
    Asm->emitSectionOffset....

It was correct, but read as if the ! was inverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239866 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp