[llvm] r264599 - Remove else after return
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 10:45:49 PDT 2016
Author: dblaikie
Date: Mon Mar 28 12:45:48 2016
New Revision: 264599
URL: http://llvm.org/viewvc/llvm-project?rev=264599&view=rev
Log:
Remove else after return
Modified:
llvm/trunk/lib/Object/MachOObjectFile.cpp
Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=264599&r1=264598&r2=264599&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Mon Mar 28 12:45:48 2016
@@ -2426,13 +2426,12 @@ ObjectFile::createMachOObjectFile(Memory
StringRef Magic = Buffer.getBuffer().slice(0, 4);
if (Magic == "\xFE\xED\xFA\xCE")
return MachOObjectFile::create(Buffer, false, false);
- else if (Magic == "\xCE\xFA\xED\xFE")
+ if (Magic == "\xCE\xFA\xED\xFE")
return MachOObjectFile::create(Buffer, true, false);
- else if (Magic == "\xFE\xED\xFA\xCF")
+ if (Magic == "\xFE\xED\xFA\xCF")
return MachOObjectFile::create(Buffer, false, true);
- else if (Magic == "\xCF\xFA\xED\xFE")
+ if (Magic == "\xCF\xFA\xED\xFE")
return MachOObjectFile::create(Buffer, true, true);
- //else
return malformedError(Buffer.getBufferIdentifier(),
"Unrecognized MachO magic number");
}
More information about the llvm-commits
mailing list