projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NVPTX: Use RAUW instead of reinventing the wheel
[oota-llvm.git]
/
lib
/
Object
/
Archive.cpp
diff --git
a/lib/Object/Archive.cpp
b/lib/Object/Archive.cpp
index 3c683408969d5b3ba57f8077bef1bae705210211..45156f1311e9fbe987afd73d81c4e2854b659162 100644
(file)
--- a/
lib/Object/Archive.cpp
+++ b/
lib/Object/Archive.cpp
@@
-181,15
+181,16
@@
Archive::Child::getAsBinary(LLVMContext *Context) const {
if (std::error_code EC = BuffOrErr.getError())
return EC;
if (std::error_code EC = BuffOrErr.getError())
return EC;
- return createBinary(
*BuffOrErr
, Context);
+ return createBinary(
std::move(*BuffOrErr)
, Context);
}
}
-ErrorOr<Archive *> Archive::create(std::unique_ptr<MemoryBuffer> Source) {
+ErrorOr<std::unique_ptr<Archive>>
+Archive::create(std::unique_ptr<MemoryBuffer> Source) {
std::error_code EC;
std::unique_ptr<Archive> Ret(new Archive(std::move(Source), EC));
if (EC)
return EC;
std::error_code EC;
std::unique_ptr<Archive> Ret(new Archive(std::move(Source), EC));
if (EC)
return EC;
- return
Ret.release(
);
+ return
std::move(Ret
);
}
Archive::Archive(std::unique_ptr<MemoryBuffer> Source, std::error_code &ec)
}
Archive::Archive(std::unique_ptr<MemoryBuffer> Source, std::error_code &ec)