llvm-mirror/lib
Justin Bogner 6484f6de8c 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
2015-03-16 06:55:45 +00:00
..
Analysis Made CFLAA agree with clang-format. NFC. 2015-03-15 00:52:21 +00:00
AsmParser [opaque pointer type] more gep API migrations (AsmParser) 2015-03-14 21:11:24 +00:00
Bitcode [opaque pointer type] more gep API migration 2015-03-14 19:53:33 +00:00
CodeGen remove function names from comments; NFC 2015-03-15 18:16:04 +00:00
DebugInfo DWARFFormValue: Add getAsSignedConstant method. 2015-03-04 22:07:41 +00:00
ExecutionEngine [Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by 2015-03-11 00:43:26 +00:00
Fuzzer [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
IR IR: Default the Metadata::dump() argument "harder" after r232275 2015-03-15 06:53:32 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker DataLayout is mandatory, update the API to reflect it with references. 2015-03-10 02:37:25 +00:00
LTO Add a parameter for getLazyBitcodeModule to lazily load Metadata. 2015-03-13 19:24:30 +00:00
MC [MCDwarf] Do not emit useless line table opcode. 2015-03-15 20:45:39 +00:00
Object Be lazy about loading metadata in IRObjectFile. 2015-03-13 21:54:20 +00:00
Option Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations. 2015-03-03 19:53:02 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData InstrProf: Do a better job of reading coverage mapping data. 2015-03-16 06:55:45 +00:00
Support No need to prototype RtlCaptureContext with mingw-w64. 2015-03-14 19:20:56 +00:00
TableGen Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Target Use SDValue bool check to tidyup some possible combines. NFC. 2015-03-15 19:47:42 +00:00
Transforms [opaque pointer type] IRBuilder gep migration progress 2015-03-15 01:03:19 +00:00
CMakeLists.txt [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
LLVMBuild.txt [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
Makefile [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00