llvm-6502/lib/Object
Rafael Espindola 3d218156f8 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199770 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-21 23:06:54 +00:00
..
Archive.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
Binary.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
CMakeLists.txt [Object] Split the ELF interface into 3 parts. 2013-08-08 22:27:13 +00:00
COFFObjectFile.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
COFFYAML.cpp Print symbol names in relocations when dumping COFF as YAML. 2013-06-06 13:06:17 +00:00
ELF.cpp Support for microMIPS TLS relocations. 2013-12-19 16:02:32 +00:00
ELFObjectFile.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
ELFYAML.cpp ELF: Add support for the exclude section bit for gas compat. 2013-09-15 19:53:20 +00:00
Error.cpp Basic support for parsing Mach-O universal binaries in LLVMObject library 2013-06-18 15:03:28 +00:00
LLVMBuild.txt Object: drop bogus VMCore dependency 2012-04-03 15:48:10 +00:00
MachOObjectFile.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
MachOUniversal.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
Makefile
Object.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
ObjectFile.cpp Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
YAML.cpp Add missing #include's to cctype when using isdigit/alpha/etc. 2013-10-12 00:55:57 +00:00