llvm-6502/include/llvm
Justin Bogner 5e4931b489 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232346 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-16 06:55:45 +00:00
..
ADT Factor the iterators of ImmutableSet/ImmutableMap into a common base class 2015-03-15 13:26:03 +00:00
Analysis Remove use of a reserved identifier 2015-03-15 01:40:42 +00:00
AsmParser Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
Bitcode Add a parameter for getLazyBitcodeModule to lazily load Metadata. 2015-03-13 19:24:30 +00:00
CodeGen Recommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memory constraints. 2015-03-13 12:45:09 +00:00
Config Drop the hacks used for partial C99 math libraries. 2015-03-09 18:35:18 +00:00
DebugInfo DWARFDebugRangeList: make the list of entries available to clients. 2015-03-13 23:30:07 +00:00
ExecutionEngine Fix build break in this code. Nothing uses this header, but the modules 2015-03-13 03:56:27 +00:00
IR IR: Default the Metadata::dump() argument "harder" after r232275 2015-03-15 06:53:32 +00:00
IRReader Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
LineEditor [C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't break the API. 2014-04-21 09:34:48 +00:00
Linker Remember to move a type to the correct set when setting the body. 2015-03-06 00:50:21 +00:00
LTO [LTO API] fix memory leakage introduced at r230290. 2015-02-25 21:20:53 +00:00
MC [NVPTXAsmPrinter] do not print .align on function headers 2015-03-12 01:50:30 +00:00
Object [Object/ELF] Add support for setVisibility() 2015-03-12 07:48:25 +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] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
ProfileData InstrProf: Teach llvm-cov to handle universal binaries when given -arch 2015-03-11 02:30:51 +00:00
Support InstrProf: Do a better job of reading coverage mapping data. 2015-03-16 06:55:45 +00:00
TableGen Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
Target Recommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memory constraints. 2015-03-13 12:45:09 +00:00
Transforms Extended support for native Windows C++ EH outlining 2015-03-11 23:22:06 +00:00
CMakeLists.txt Remove llvm_headers_do_not_build for the benefit of XCode and Visual Studio users. 2014-08-14 00:51:47 +00:00
InitializePasses.h Add a new pass "Loop Interchange" 2015-03-06 10:11:25 +00:00
LinkAllIR.h
LinkAllPasses.h Add a new pass "Loop Interchange" 2015-03-06 10:11:25 +00:00
module.modulemap [modules] Mark Analysis/TargetLibraryInfo.def as a textual header. 2015-03-06 23:39:54 +00:00
module.modulemap.build [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Pass.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassAnalysisSupport.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassInfo.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassRegistry.h Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization. 2015-03-05 17:53:00 +00:00
PassSupport.h Defining a new API for debug options that doesn't rely on static global cl::opts. 2014-10-15 21:54:35 +00:00