From 74237155e5871a25544bec8382f059e4c23987e8 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 26 Jan 2016 19:57:42 +0000 Subject: [PATCH] [llvm-nm] Roll several conditions into a single if. NFCI. llvm-svn: 258846 --- llvm/tools/llvm-nm/llvm-nm.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp index 435f543..26d1e18 100644 --- a/llvm/tools/llvm-nm/llvm-nm.cpp +++ b/llvm/tools/llvm-nm/llvm-nm.cpp @@ -587,14 +587,9 @@ static void sortAndPrintSymbolList(SymbolicFile &Obj, bool printName, I != E; ++I) { uint32_t SymFlags = I->Sym.getFlags(); bool Undefined = SymFlags & SymbolRef::SF_Undefined; - if (!Undefined && UndefinedOnly) - continue; - if (Undefined && DefinedOnly) - continue; bool Global = SymFlags & SymbolRef::SF_Global; - if (!Global && ExternalOnly) - continue; - if (SizeSort && !PrintAddress) + if ((!Undefined && UndefinedOnly) || (Undefined && DefinedOnly) || + (!Global && ExternalOnly) || (SizeSort && !PrintAddress)) continue; if (PrintFileName) { if (!ArchitectureName.empty()) -- 2.7.4