1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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) {
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;
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);
}
ErrorOr<std::unique_ptr<Archive>>