X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FObject%2FArchive.cpp;h=45156f1311e9fbe987afd73d81c4e2854b659162;hb=0c5071f56198367ea2b29f8e34ddb9ecd1773985;hp=63877913937e84562f426ee9656b57ef0dc9f0a3;hpb=0c466c88d489a3789e535a333966c9953480404b;p=oota-llvm.git diff --git a/lib/Object/Archive.cpp b/lib/Object/Archive.cpp index 63877913937..45156f1311e 100644 --- a/lib/Object/Archive.cpp +++ b/lib/Object/Archive.cpp @@ -181,16 +181,16 @@ Archive::Child::getAsBinary(LLVMContext *Context) const { if (std::error_code EC = BuffOrErr.getError()) return EC; - std::unique_ptr Buff(BuffOrErr.get().release()); - return createBinary(Buff, Context); + return createBinary(std::move(*BuffOrErr), Context); } -ErrorOr Archive::create(std::unique_ptr Source) { +ErrorOr> +Archive::create(std::unique_ptr Source) { std::error_code EC; std::unique_ptr Ret(new Archive(std::move(Source), EC)); if (EC) return EC; - return Ret.release(); + return std::move(Ret); } Archive::Archive(std::unique_ptr Source, std::error_code &ec)