From b2a729c66418df6e533c17fba80ab847786b05e7 Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Mon, 3 Aug 2015 00:10:33 +0000 Subject: [PATCH] Use early return NFC. llvm-svn: 243863 --- lib/Object/MachOUniversal.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Object/MachOUniversal.cpp b/lib/Object/MachOUniversal.cpp index 1d0e69e4622..a1c83b9b7f8 100644 --- a/lib/Object/MachOUniversal.cpp +++ b/lib/Object/MachOUniversal.cpp @@ -69,14 +69,14 @@ MachOUniversalBinary::ObjectForArch::ObjectForArch( ErrorOr> 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>