llvm-mirror/tools
Kevin Enderby 6e0594e553 Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary
and its clients to use the new llvm::Error model for error handling.

Changed getAsArchive() from ErrorOr<...> to Expected<...> so now all
interfaces there use the new llvm::Error model for return values.

In the two places it had if (!Parent) this is actually a program error so changed
from returning errorCodeToError(object_error::parse_failed) to calling
report_fatal_error() with a message.

In getObjectForArch() added error messages to its two llvm::Error return values
instead of returning errorCodeToError(object_error::arch_not_found) with no
error message.

For the llvm-obdump, llvm-nm and llvm-size clients since the only binary files in
Mach-O Universal Binaries that are supported are Mach-O files or archives with
Mach-O objects, updated their logic to generate an error when a slice contains
something like an ELF binary instead of ignoring it. And added a test case for
that.

The last error stuff to be cleaned up for libObject’s MachOUniversalBinary is
the use of errorOrToExpected(Archive::create(ObjBuffer)) which needs
Archive::create() to be changed from ErrorOr<...> to Expected<...> first,
which I’ll work on next. 

llvm-svn: 274079
2016-06-28 23:16:13 +00:00
..
bugpoint [Bugpoint] Erase comdat annotations after removing a global's initializer. 2016-06-15 23:20:12 +00:00
bugpoint-passes Remove autoconf support 2016-01-26 21:29:08 +00:00
dsymutil Change all but the last ErrorOr<...> use for MachOUniversalBinary to Expected<...> to 2016-06-27 21:39:39 +00:00
gold Don't use the new x86 relax relocations on the gold plugin. 2016-06-17 17:53:57 +00:00
llc [llc] Remove exit-on-error flag (PR27759) 2016-06-23 09:49:56 +00:00
lli Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-ar [llvm-ar] Ignore -plugin option. 2016-06-27 20:38:39 +00:00
llvm-as Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-as-fuzzer Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-bcanalyzer Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-c-test Add support for callsite in the new C API for attributes 2016-06-15 05:14:29 +00:00
llvm-config [build] Make sure to link main executable with pthreads 2016-06-21 19:34:40 +00:00
llvm-cov Fix "not all control paths return a value" warning on MSVC 2016-06-28 21:02:41 +00:00
llvm-cxxdump Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
llvm-diff [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-dis IR: Allow metadata attachments on declarations, and fix lazy loaded metadata issue with globals. 2016-06-21 23:42:48 +00:00
llvm-dwarfdump Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-dwp llvm-dwp: Ensure uncompressed sections are not relocated during processing of later inputs 2016-05-25 23:37:06 +00:00
llvm-extract Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-go Remove autoconf support 2016-01-26 21:29:08 +00:00
llvm-jitlistener Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-link Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-lto Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-mc Change the default of -relax-relocations. 2016-06-17 17:04:56 +00:00
llvm-mc-fuzzer [llvm-mc-fuzzer] Use LLVMFuzzerInitialize() instead of a custom main() and FuzzerDriver() 2016-05-13 10:23:04 +00:00
llvm-mcmarkup Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
llvm-nm Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
llvm-objdump Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
llvm-pdbdump [pdb] Don't error on missing FPO streams 2016-06-17 20:38:01 +00:00
llvm-profdata Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param. 2016-06-17 20:41:14 +00:00
llvm-readobj Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
llvm-rtdyld Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
llvm-shlib Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets" 2016-05-26 04:35:35 +00:00
llvm-size Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
llvm-split Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
llvm-stress [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
llvm-symbolizer Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
lto Delete Reloc::Default. 2016-05-18 22:04:49 +00:00
msbuild MSBuild integration: fix the loop in install.bat 2014-09-30 22:30:06 +00:00
obj2yaml [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
opt [PM] Port PreISelIntrinsicLowering to the new PM 2016-06-24 20:13:42 +00:00
sancov Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
sanstats [Symbolize] Check if the PE file has a PDB and emit an error if we can't load it 2016-06-03 20:25:09 +00:00
verify-uselistorder Search for llvm-symbolizer binary in the same directory as argv[0], before 2016-06-09 00:53:21 +00:00
xcode-toolchain [CMake] Cleanup uses of USES_TERMINAL 2016-06-08 22:19:25 +00:00
yaml2obj [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
CMakeLists.txt Fixup r271533, or check-clang didn't find llvm-lto as the target. 2016-06-02 20:39:24 +00:00
LLVMBuild.txt llvm-dwp: Initial layout 2015-12-01 00:48:34 +00:00