[lld] r198108 - Simplify if ... return repetition.
Rui Ueyama
ruiu at google.com
Sat Dec 28 02:09:21 PST 2013
Author: ruiu
Date: Sat Dec 28 04:09:21 2013
New Revision: 198108
URL: http://llvm.org/viewvc/llvm-project?rev=198108&view=rev
Log:
Simplify if ... return repetition.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
Modified: lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp?rev=198108&r1=198107&r2=198108&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp Sat Dec 28 04:09:21 2013
@@ -235,13 +235,8 @@ uint32_t PECOFFLinkingContext::getSectio
// e.g. different export ordinals.
static bool exportConflicts(const PECOFFLinkingContext::ExportDesc &a,
const PECOFFLinkingContext::ExportDesc &b) {
- if (a.ordinal > 0 && b.ordinal > 0 && a.ordinal != b.ordinal)
- return true;
- if (a.noname != b.noname)
- return true;
- if (a.isData != b.isData)
- return true;
- return false;
+ return (a.ordinal > 0 && b.ordinal > 0 && a.ordinal != b.ordinal) ||
+ a.noname != b.noname || a.isData != b.isData;
}
void PECOFFLinkingContext::addDllExport(ExportDesc &desc) {
More information about the llvm-commits
mailing list