1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/tools
Rafael Espindola 9d9569b657 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
2014-01-21 23:06:54 +00:00
..
bugpoint Whitespace. 2014-01-15 08:21:38 +00:00
bugpoint-passes Set LLVM_EXPORTED_SYMBOL_FILE in CMakeLists whose corresponding Makefiles do so. 2013-12-29 23:06:49 +00:00
gold Re-sort #include lines again, prior to moving headers around. 2014-01-13 08:04:33 +00:00
llc Re-sort #include lines again, prior to moving headers around. 2014-01-13 08:04:33 +00:00
lli Return an error_code from materializeAllPermanently. 2014-01-14 23:51:27 +00:00
llvm-ar Rename these methods to match the style guide. 2014-01-21 16:09:45 +00:00
llvm-as [PM] Make the verifier work independently of any pass manager. 2014-01-19 02:22:18 +00:00
llvm-bcanalyzer [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
llvm-c-test Use -std=gnu99 in tools/llvm-c-test/CMakeLists.txt 2014-01-08 11:48:19 +00:00
llvm-config llvm-config: Fix typo in help message introduced with r197664. 2013-12-25 02:24:32 +00:00
llvm-cov llvm-cov: Added -f option for function summaries. 2013-12-19 00:29:25 +00:00
llvm-diff [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-dis Return an error_code from materializeAllPermanently. 2014-01-14 23:51:27 +00:00
llvm-dwarfdump llvm-dwarfdump: type unit dwo support 2014-01-09 05:08:24 +00:00
llvm-extract [PM] Wire up support for writing bitcode with new PM. 2014-01-13 07:38:24 +00:00
llvm-jitlistener
llvm-link [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
llvm-lto Re-sort #include lines again, prior to moving headers around. 2014-01-13 08:04:33 +00:00
llvm-mc [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-mcmarkup
llvm-nm Rename these methods to match the style guide. 2014-01-21 16:09:45 +00:00
llvm-objdump Be a bit more consistent about using ErrorOr when constructing Binary objects. 2014-01-21 23:06:54 +00:00
llvm-readobj Rename these methods to match the style guide. 2014-01-21 16:09:45 +00:00
llvm-rtdyld [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
llvm-shlib Strip dead code when linking by default with BFD ld (linux, ...) and ld64 (os x). 2013-12-27 22:38:59 +00:00
llvm-size Rename these methods to match the style guide. 2014-01-21 16:09:45 +00:00
llvm-stress [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
llvm-symbolizer llvm-symbolizer: make mangled name heuristic apply to all symbols 2014-01-16 17:25:12 +00:00
lto Adding new LTO APIs to parse metadata nodes and extract linker options and 2014-01-21 18:31:27 +00:00
macho-dump Return an ErrorOr<Binary *> from createBinary. 2014-01-15 19:37:43 +00:00
msbuild VS integration: use the correct registry key after r195379 2013-11-22 18:25:43 +00:00
obj2yaml [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
opt Whitespace. 2014-01-20 15:47:15 +00:00
yaml2obj [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 11:13:32 +00:00
CMakeLists.txt llvm/tools/llvm-c-test should be built also on msvc. 2013-10-23 17:56:59 +00:00
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile Add llvm-c-test tool for testing llvm-c 2013-10-23 08:10:20 +00:00