1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Object
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
..
AArch64
AMDGPU
ARM
Inputs Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
Lanai
Mips
X86
ar-create.test
ar-error.test
archive-delete.test
archive-error-tmp.txt
archive-extract-dir.test
archive-extract.test
archive-format.test
archive-long-index.test
archive-move.test
archive-replace-pos.test
archive-symtab.test
archive-thin-read.test
archive-toc.test
archive-update.test
check_binary_output.ll
coff-archive-short.test
coff-archive.test
coff-invalid.test
coff-weak-externals.test
corrupt.test
directory.ll
dllimport-globalref.ll
dllimport.ll
dyn-rel-relocation.test
dynamic-reloc.test
elf-reloc-no-sym.test
elf-unknown-type.test
invalid.test
kext.test
lit.local.cfg
macho-invalid.test Finish cleaning up most of the error handling in libObject’s MachOUniversalBinary 2016-06-28 23:16:13 +00:00
mangle-ir.ll
mri1.test
mri2.test
mri3.test
mri4.test
mri5.test
mri-addlib.test
mri-addmod.test
mri-crlf.test
nm-archive.test
nm-darwin-m.test
nm-error.test
nm-irix6.test
nm-pe-image.test
nm-shared-object.test
nm-trivial-object.test
nm-universal-binary.test
nm-weak-global-macho.test
no-section-header-string-table.test
no-section-table.test
obj2yaml-coff-long-file-symbol.test
obj2yaml-coff-long-section-name.test
obj2yaml-coff-section-aux-symbol.test
obj2yaml-coff-weak-external.test
obj2yaml-sectiongroup.test
obj2yaml.test
objdump-export-list.test
objdump-file-header.test
objdump-no-sectionheaders.test
objdump-private-headers.test
objdump-reloc-shared.test
objdump-relocations.test
objdump-section-content.test
objdump-sectionheaders.test
objdump-shndx.test
objdump-symbol-table.test
pr25877.test
readobj-absent.test
readobj-elf-versioning.test
readobj-shared-object.test
readobj.test
relocation-executable.test
simple-archive.test
size-trivial-macho.test
stackmap-dump.test
yaml2obj-coff-invalid-alignment.test
yaml2obj-coff-multi-doc.test
yaml2obj-elf-alignment.yaml
yaml2obj-elf-bits-endian.test
yaml2obj-elf-file-headers-with-e_flags.yaml
yaml2obj-elf-file-headers.yaml
yaml2obj-elf-multi-doc.test
yaml2obj-elf-rel-noref.yaml
yaml2obj-elf-rel.yaml
yaml2obj-elf-section-basic.yaml
yaml2obj-elf-section-invalid-size.yaml
yaml2obj-elf-symbol-basic.yaml
yaml2obj-elf-symbol-LocalGlobalWeak.yaml
yaml2obj-elf-symbol-visibility.yaml
yaml2obj-readobj.test