summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/Inputs/binary-formats.macho64l
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-03-16 06:55:45 +0000
committerJustin Bogner <mail@justinbogner.com>2015-03-16 06:55:45 +0000
commit7b33cc9dbc38b2748de6b6c34e8210fce6896781 (patch)
treeabefe2e93bd27beb31c9bcc440c0547f46877ae2 /llvm/test/tools/llvm-cov/Inputs/binary-formats.macho64l
parent0fc6c6762f46a19ba59a482d3fbe7440e084baa0 (diff)
downloadbcm5719-llvm-7b33cc9dbc38b2748de6b6c34e8210fce6896781.tar.gz
bcm5719-llvm-7b33cc9dbc38b2748de6b6c34e8210fce6896781.zip
InstrProf: Do a better job of reading coverage mapping data.
This code was casting regions of a memory buffer to a couple of different structs. This is wrong in a few ways: 1. It breaks aliasing rules. 2. If the buffer isn't aligned, it hits undefined behaviour. 3. It completely ignores endianness differences. 4. The structs being defined for this aren't specifying their padding properly, so this doesn't even represent the data properly on some platforms. This commit is mostly NFC, except that it fixes reading coverage for 32 bit binaries as a side effect of getting rid of the mispadded structs. I've included a test for that. I've also baked in that we only handle little endian more explicitly, since that was true in practice already. I'll fix this to handle endianness properly in a followup commit. llvm-svn: 232346
Diffstat (limited to 'llvm/test/tools/llvm-cov/Inputs/binary-formats.macho64l')
-rwxr-xr-xllvm/test/tools/llvm-cov/Inputs/binary-formats.macho64lbin0 -> 920 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/binary-formats.macho64l b/llvm/test/tools/llvm-cov/Inputs/binary-formats.macho64l
new file mode 100755
index 00000000000..0045c435575
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/Inputs/binary-formats.macho64l
Binary files differ
OpenPOWER on IntegriCloud