[PATCH] D16665: ELF: Do not treat errors in InputFiles class as fatal errors.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 18:28:27 PST 2016


ruiu created this revision.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.

This file is not as easy to handle errors as the driver or the
symbol table because of the nature of file IO. However, I think
this patch is not as horrible as I expected; I'm fairly satisfied
with this change. If we find an error, we call error() to record
the error, and return a zero value.  Zero value is an empty
vector for the vector, nullptr for a pointer, or an empty string
for the StringRef. Callers gracefully handle such values.

In some cases, we don't have good zero values. I changed the
type of such functions so that they return a boolean value.

All changes are mechanical and should not change the existing
behavior.

http://reviews.llvm.org/D16665

Files:
  ELF/Driver.cpp
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/SymbolTable.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16665.46207.patch
Type: text/x-patch
Size: 18592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160128/350f14af/attachment.bin>


More information about the llvm-commits mailing list