diff options
Diffstat (limited to 'include/llvm/Object/Archive.h')
-rw-r--r-- | include/llvm/Object/Archive.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Object/Archive.h b/include/llvm/Object/Archive.h index 600ab23a78..4fe44a7769 100644 --- a/include/llvm/Object/Archive.h +++ b/include/llvm/Object/Archive.h @@ -72,7 +72,7 @@ public: Child getNext() const; - std::error_code getName(StringRef &Result) const; + ErrorOr<StringRef> getName() const; StringRef getRawName() const { return getHeader()->getName(); } sys::TimeValue getLastModified() const { return getHeader()->getLastModified(); @@ -89,11 +89,11 @@ public: return StringRef(Data.data() + StartOfFile, getSize()); } - std::error_code getMemoryBuffer(std::unique_ptr<MemoryBuffer> &Result, - bool FullPath = false) const; + ErrorOr<std::unique_ptr<MemoryBuffer>> + getMemoryBuffer(bool FullPath = false) const; - std::error_code getAsBinary(std::unique_ptr<Binary> &Result, - LLVMContext *Context = nullptr) const; + ErrorOr<std::unique_ptr<Binary>> + getAsBinary(LLVMContext *Context = nullptr) const; }; class child_iterator { @@ -137,8 +137,8 @@ public: : Parent(p) , SymbolIndex(symi) , StringIndex(stri) {} - std::error_code getName(StringRef &Result) const; - std::error_code getMember(child_iterator &Result) const; + StringRef getName() const; + ErrorOr<child_iterator> getMember() const; Symbol getNext() const; }; |