mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 12:30:57 +00:00
Object: Add a missing return in ObjectFile::createObjectFile
When Error was threaded through these APIs back in r265606 the "return" was missed here, which triggers a warning if/when I add LLVM_NODISCARD to the Error type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
63ae3007f1
commit
b3c2bab0a7
@ -118,8 +118,8 @@ ObjectFile::createObjectFile(StringRef ObjectPath) {
|
||||
|
||||
Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
|
||||
createObjectFile(Buffer->getMemBufferRef());
|
||||
if (!ObjOrErr)
|
||||
ObjOrErr.takeError();
|
||||
if (Error Err = ObjOrErr.takeError())
|
||||
return std::move(Err);
|
||||
std::unique_ptr<ObjectFile> Obj = std::move(ObjOrErr.get());
|
||||
|
||||
return OwningBinary<ObjectFile>(std::move(Obj), std::move(Buffer));
|
||||
|
Loading…
Reference in New Issue
Block a user