llvm/lib/Object
Lang Hames 9b42acafff [Object] Change Archive::child_iterator for better interop with Error/Expected.
See http://reviews.llvm.org/D22079

Changes the Archive::child_begin and Archive::children to require a reference
to an Error. If iterator increment fails (because the archive header is
damaged) the iterator will be set to 'end()', and the error stored in the
given Error&. The Error value should be checked by the user immediately after
the loop. E.g.:

Error Err;
for (auto &C : A->children(Err)) {
  // Do something with archive child C.
}
// Check the error immediately after the loop.
if (Err)
  return Err;

Failure to check the Error will result in an abort() when the Error goes out of
scope (as guaranteed by the Error class).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-13 21:13:05 +00:00
..
Archive.cpp [Object] Change Archive::child_iterator for better interop with Error/Expected. 2016-07-13 21:13:05 +00:00
ArchiveWriter.cpp Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
Binary.cpp Change Archive::create() from ErrorOr<...> to Expected<...> and update 2016-06-29 20:35:44 +00:00
CMakeLists.txt [CMake] Restrict libxar linkage to just llvm-objdump 2016-05-26 16:32:40 +00:00
COFFObjectFile.cpp [Object, COFF] An import data directory might not consist soley of imports 2016-06-26 04:36:32 +00:00
ELF.cpp Support/ELF: Add AMDGPU relocation definitions to match documentation 2016-06-17 22:38:08 +00:00
ELFObjectFile.cpp [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
Error.cpp Add FIXMEs to all derived classes of std::error_category. 2016-05-24 20:13:46 +00:00
IRObjectFile.cpp function_refify. NFC. 2016-07-01 11:05:15 +00:00
LLVMBuild.txt
MachOObjectFile.cpp Add checks to the MachOObjectFile() constructor to make sure load commands sizes 2016-07-07 22:11:42 +00:00
MachOUniversal.cpp Change Archive::create() from ErrorOr<...> to Expected<...> and update 2016-06-29 20:35:44 +00:00
ModuleSummaryIndexObjectFile.cpp Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param. 2016-06-17 20:41:14 +00:00
Object.cpp Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to allow 2016-06-24 18:24:42 +00:00
ObjectFile.cpp Thread Expected<...> up from libObject’s getType() for symbols to allow llvm-objdump to produce a good error message. 2016-05-02 20:28:12 +00:00
RecordStreamer.cpp [IRObjectFile] Propagate .weak attribute correctly for ASM symbols. 2016-06-22 20:48:15 +00:00
RecordStreamer.h [IRObjectFile] Propagate .weak attribute correctly for ASM symbols. 2016-06-22 20:48:15 +00:00
SymbolicFile.cpp Thread Expected<...> up from createMachOObjectFile() to allow llvm-objdump to produce a real error message 2016-04-06 22:14:09 +00:00
SymbolSize.cpp