Change createObjectFile to return an ErrorOr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-01-22 00:14:49 +00:00
parent 6220c8f960
commit 825fc31bd3
8 changed files with 31 additions and 27 deletions

View File

@ -376,8 +376,8 @@ public:
/// @param ObjectPath The path to the object file. ObjectPath.isObject must
/// return true.
/// @brief Create ObjectFile from path.
static ObjectFile *createObjectFile(StringRef ObjectPath);
static ObjectFile *createObjectFile(MemoryBuffer *Object);
static ErrorOr<ObjectFile *> createObjectFile(StringRef ObjectPath);
static ErrorOr<ObjectFile *> createObjectFile(MemoryBuffer *Object);
static inline bool classof(const Binary *v) {
return v->isObject();