Use early return NFC.

llvm-svn: 243863
This commit is contained in:
Frederic Riss 2015-08-03 00:10:33 +00:00
parent dca9bc0f6e
commit b2a729c664

View File

@ -69,14 +69,14 @@ MachOUniversalBinary::ObjectForArch::ObjectForArch(
ErrorOr<std::unique_ptr<MachOObjectFile>>
MachOUniversalBinary::ObjectForArch::getAsObjectFile() const {
if (Parent) {
if (!Parent)
return object_error::parse_failed;
StringRef ParentData = Parent->getData();
StringRef ObjectData = ParentData.substr(Header.offset, Header.size);
StringRef ObjectName = Parent->getFileName();
MemoryBufferRef ObjBuffer(ObjectData, ObjectName);
return ObjectFile::createMachOObjectFile(ObjBuffer);
}
return object_error::parse_failed;
}
ErrorOr<std::unique_ptr<Archive>>