1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib
Rafael Espindola 08aa78de63 Don't own the buffer in object::Binary.
Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries
(like Archive) and we had to create dummy buffers just to handle that. It is
also a bad fit for IRObjectFile where the Module wants to own the buffer too.

Keeping this ownership would make supporting IR inside native objects
particularly painful.

This patch focuses in lib/Object. If something elsewhere used to own an Binary,
now it also owns a MemoryBuffer.

This patch introduces a few new types.

* MemoryBufferRef. This is just a pair of StringRefs for the data and name.
  This is to MemoryBuffer as StringRef is to std::string.
* OwningBinary. A combination of Binary and a MemoryBuffer. This is needed
  for convenience functions that take a filename and return both the
  buffer and the Binary using that buffer.

The C api now uses OwningBinary to avoid any change in semantics. I will start
a new thread to see if we want to change it and how.

llvm-svn: 216002
2014-08-19 18:44:46 +00:00
..
Analysis Answer to Philip Reames comments 2014-08-18 22:18:14 +00:00
AsmParser Modernize the .ll parsing interface. 2014-08-19 16:58:54 +00:00
Bitcode BitcodeReader: Only create one basic block for each blockaddress 2014-08-16 01:54:37 +00:00
CodeGen Teach the AArch64 backend to handle f16 2014-08-18 14:22:39 +00:00
DebugInfo Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
ExecutionEngine Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
IR Reapply r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957 2014-08-19 16:39:58 +00:00
IRReader Modernize the .ll parsing interface. 2014-08-19 16:58:54 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Set comdats when lazily linking functions. 2014-08-15 20:17:08 +00:00
LTO Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
MC TableGen: allow use of uint64_t for available features mask. 2014-08-18 11:49:42 +00:00
Object Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
Option [Option] Support MultiArg in --help 2014-08-15 21:35:07 +00:00
ProfileData Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
Support Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
TableGen Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Target Hide two different AlignMode enums in anonymous namespaces. This bug is reported by UBSan. 2014-08-19 18:40:39 +00:00
Transforms Revert "Small refactor on VectorizerHint for deduplication" 2014-08-19 18:08:50 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00