InstrProf: Fix CoverageMappingReader on big endian
authorJustin Bogner <mail@justinbogner.com>
Mon, 16 Mar 2015 21:40:18 +0000 (21:40 +0000)
committerJustin Bogner <mail@justinbogner.com>
Mon, 16 Mar 2015 21:40:18 +0000 (21:40 +0000)
commita438717638bfe7e67f82de167306a898571ce925
tree14dcce95e2f10b40e2aa6befc74bbcef6477bb1f
parenta20616ec1062e53915c0f7715cde009abe527b73
InstrProf: Fix CoverageMappingReader on big endian

This makes the reader check the endianness of the object file its
given and behave appropriately. For the test I dug up a really old
linker and created a ppc-apple-darwin file for llvm-cov to read.

llvm-svn: 232422
llvm/lib/ProfileData/CoverageMappingReader.cpp
llvm/test/tools/llvm-cov/Inputs/binary-formats.macho32b [new file with mode: 0755]
llvm/test/tools/llvm-cov/binary-formats.c