| #
a4d22472 |
| 31-May-2015 |
Rafael Espindola <[email protected]> |
Simplify interface of function that doesn't fail.
llvm-svn: 238700
|
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1 |
|
| #
a7ad4b3f |
| 25-Feb-2015 |
Justin Bogner <[email protected]> |
Object: Handle Mach-O kext bundle files
This particular subtype of Mach-O was missing. Add it.
llvm-svn: 230567
|
|
Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1 |
|
| #
bbd875b6 |
| 18-Nov-2014 |
Michael J. Spencer <[email protected]> |
Support ELF files of unknown type.
llvm-svn: 222208
|
|
Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3 |
|
| #
48af1c2a |
| 19-Aug-2014 |
Rafael Espindola <[email protected]> |
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
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
show more ...
|
|
Revision tags: llvmorg-3.5.0-rc2 |
|
| #
437b0d58 |
| 31-Jul-2014 |
Rafael Espindola <[email protected]> |
Use std::unique_ptr to make the ownership explicit.
llvm-svn: 214377
|
|
Revision tags: llvmorg-3.5.0-rc1 |
|
| #
adf21f2a |
| 06-Jul-2014 |
Rafael Espindola <[email protected]> |
Update the MemoryBuffer API to use ErrorOr.
llvm-svn: 212405
|
| #
2e60ca96 |
| 24-Jun-2014 |
Rafael Espindola <[email protected]> |
Pass a unique_ptr<MemoryBuffer> to the constructors in the Binary hierarchy.
Once the objects are constructed, they own the buffer. Passing a unique_ptr makes that clear.
llvm-svn: 211595
|
| #
6304e941 |
| 23-Jun-2014 |
Rafael Espindola <[email protected]> |
Pass a std::unique_ptr& to the create??? methods is lib/Object.
This makes the buffer ownership on error conditions very natural. The buffer is only moved out of the argument if an object is constru
Pass a std::unique_ptr& to the create??? methods is lib/Object.
This makes the buffer ownership on error conditions very natural. The buffer is only moved out of the argument if an object is constructed that now owns the buffer.
llvm-svn: 211546
show more ...
|
| #
c3f9b5a5 |
| 23-Jun-2014 |
Rafael Espindola <[email protected]> |
Make ObjectFile and BitcodeReader always own the MemoryBuffer.
This allows us to just use a std::unique_ptr to store the pointer to the buffer. The flip side is that they have to support releasing t
Make ObjectFile and BitcodeReader always own the MemoryBuffer.
This allows us to just use a std::unique_ptr to store the pointer to the buffer. The flip side is that they have to support releasing the buffer back to the caller.
Overall this looks like a more efficient and less brittle api.
llvm-svn: 211542
show more ...
|
| #
db4ed0bd |
| 13-Jun-2014 |
Rafael Espindola <[email protected]> |
Remove 'using std::errro_code' from lib.
llvm-svn: 210871
|
| #
3acea398 |
| 12-Jun-2014 |
Rafael Espindola <[email protected]> |
Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.
llvm-svn: 210835
|
| #
a6e9c3e4 |
| 12-Jun-2014 |
Rafael Espindola <[email protected]> |
Remove system_error.h.
This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch.
llvm-svn: 210803
|
|
Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1, llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1 |
|
| #
56440fd8 |
| 06-Mar-2014 |
Ahmed Charles <[email protected]> |
Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which ha
Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary.
llvm-svn: 203083
show more ...
|
| #
96c9d95f |
| 05-Mar-2014 |
Ahmed Charles <[email protected]> |
[C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
|
| #
40066cce |
| 21-Feb-2014 |
Aaron Ballman <[email protected]> |
Shankar kindly pointed out that I wasn't following the coding convention properly, so moving raw_ostream.h above system_error.h.
llvm-svn: 201885
|
| #
b1f8a5a5 |
| 21-Feb-2014 |
Aaron Ballman <[email protected]> |
Fixing the MSVC build by including a file.
llvm-svn: 201884
|
| #
f12b8282 |
| 21-Feb-2014 |
Rafael Espindola <[email protected]> |
Add a SymbolicFile interface between Binary and ObjectFile.
This interface allows IRObjectFile to be implemented without having dummy methods for all section and segment related methods.
Both llvm-
Add a SymbolicFile interface between Binary and ObjectFile.
This interface allows IRObjectFile to be implemented without having dummy methods for all section and segment related methods.
Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is still not plugged in since it requires some refactoring to make a Module hold a DataLayout.
llvm-svn: 201881
show more ...
|
| #
afcc3df7 |
| 24-Jan-2014 |
Rafael Espindola <[email protected]> |
Make ObjectFile ownership of the MemoryBuffer optional.
This allows llvm-ar to mmap the input files only once.
llvm-svn: 200040
|
| #
ec46f318 |
| 22-Jan-2014 |
Rafael Espindola <[email protected]> |
Pass the computed magic to createBinary and createObjectFile if available.
identify_magic is not free, so we should avoid calling it twice. The argument also makes it cheap for createBinary to just
Pass the computed magic to createBinary and createObjectFile if available.
identify_magic is not free, so we should avoid calling it twice. The argument also makes it cheap for createBinary to just forward to createObjectFile.
llvm-svn: 199813
show more ...
|
| #
51cc3602 |
| 22-Jan-2014 |
Rafael Espindola <[email protected]> |
Change createObjectFile to return an ErrorOr.
llvm-svn: 199776
|
| #
692410ef |
| 21-Jan-2014 |
Rafael Espindola <[email protected]> |
Be a bit more consistent about using ErrorOr when constructing Binary objects.
The constructors of classes deriving from Binary normally take an error_code as an argument to the constructor. My orig
Be a bit more consistent about using ErrorOr when constructing Binary objects.
The constructors of classes deriving from Binary normally take an error_code as an argument to the constructor. My original intent was to change them to have a trivial constructor and move the initial parsing logic to a static method returning an ErrorOr. I changed my mind because:
* A constructor with an error_code out parameter is extremely convenient from the implementation side. We can incrementally construct the object and give up when we find an error. * It is very efficient when constructing on the stack or when there is no error. The only inefficient case is where heap allocating and an error is found (we have to free the memory).
The result is that this is a much smaller patch. It just standardizes the create* helpers to return an ErrorOr.
Almost no functionality change: The only difference is that this found that we were trying to read past the end of COFF import library but ignoring the error.
llvm-svn: 199770
show more ...
|
|
Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1 |
|
| #
e448f9e4 |
| 15-Nov-2013 |
Rui Ueyama <[email protected]> |
Path: Recognize COFF import library file magic.
Summary: Make identify_magic to recognize COFF import file.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandl
Path: Recognize COFF import library file magic.
Summary: Make identify_magic to recognize COFF import file.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2165
llvm-svn: 194852
show more ...
|
| #
fc149a69 |
| 15-Oct-2013 |
Rui Ueyama <[email protected]> |
Path: Recognize Windows compiled resource file.
Some background: One can pass compiled resource files (.res files) directly to the linker on Windows. If a resource file is given, the linker will run
Path: Recognize Windows compiled resource file.
Some background: One can pass compiled resource files (.res files) directly to the linker on Windows. If a resource file is given, the linker will run "cvtres" command in background to convert the resource file to a COFF file to link it.
What I'm trying to do with this patch is to make the linker to recognize the resource file by file magic, so that it can run cvtres command.
Differential Revision: http://llvm-reviews.chandlerc.com/D1943
llvm-svn: 192742
show more ...
|
| #
4d76a21b |
| 24-Jul-2013 |
Rafael Espindola <[email protected]> |
Delete the buffer in createObjectFile if it fails.
The Binary constructor takes ownership of the memory buffer. This is a fairly unfortunate interface, but for now make createObjectFile consistent w
Delete the buffer in createObjectFile if it fails.
The Binary constructor takes ownership of the memory buffer. This is a fairly unfortunate interface, but for now make createObjectFile consistent with it by also deleting the buffer if it fails.
Fixes a leak in llvm-ar found by the valgrind bots.
llvm-svn: 187039
show more ...
|
|
Revision tags: llvmorg-3.3.1-rc1 |
|
| #
e6388e62 |
| 18-Jun-2013 |
Alexey Samsonov <[email protected]> |
Basic support for parsing Mach-O universal binaries in LLVMObject library
llvm-svn: 184191
|