summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-nm/llvm-nm.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp
index 435f543ef08..26d1e182abc 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())
OpenPOWER on IntegriCloud