[PATCH] D32090: [InstrProf] Fix Windows cross compilation TODOs to fix failing tests

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 10:57:36 PDT 2017


rnk created this revision.

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.


https://reviews.llvm.org/D32090

Files:
  clang/lib/CodeGen/CoverageMappingGen.cpp
  llvm/include/llvm/Object/ObjectFile.h
  llvm/include/llvm/ProfileData/InstrProf.h
  llvm/include/llvm/Transforms/InstrProfiling.h
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/Object/ObjectFile.cpp
  llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
  llvm/lib/ProfileData/InstrProf.cpp
  llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
  llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  llvm/tools/llvm-cov/TestingSupport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32090.95317.patch
Type: text/x-patch
Size: 15074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170414/52162226/attachment.bin>


More information about the llvm-commits mailing list