Coverage and profiling tests have been failing on Windows since r300279:
http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/4061
Pass the object format to the section name lookup functions rather than
the Module, since we can compute the object format from the object file.
Add a helper to ObjectFile that can get the object format in Triple
enum.
There is a complication around MachO, which is that sometimes we want
DATA,llvm_foo,regular,live_support and sometimes we just want
__llvm_foo. Typically llvm-cov wants the bare section name without the
segment and flags, because it's looking the section name up in an
executable. Currently I have a hack in the coverage reader to pretend
that MachO files have an unknown object file type to suppress the
segment prefix, but we can probably come up with a better API than that.
Using 'unknown object' kind seems like a hack. What vsk had in mind is to restore addsegment parameter but with default to false.