summaryrefslogtreecommitdiff
path: root/tools/llvm-nm
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-02-01 19:22:16 +0000
committerDavide Italiano <davide@freebsd.org>2016-02-01 19:22:16 +0000
commit88b3e3ebd1b5b702bd6b705c2d20495a8f494ec8 (patch)
tree9c367cb5c8cb8c9197a88d9ad28da14bbbf22ef8 /tools/llvm-nm
parent60101204f11bfd492093b728a7d95a782511cd78 (diff)
[llvm-nm] Simplify the code a bit. NFCI.
Fix a style violation while I'm here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r--tools/llvm-nm/llvm-nm.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index d118d3ffc04..01f82cfff8a 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -260,15 +260,11 @@ static void darwinPrintSymbol(SymbolicFile &Obj, SymbolListT::iterator I,
// use 1, 2 and 3 for section numbers. See below where they are used to
// print out fake section names.
NType |= MachO::N_SECT;
- if(SymFlags & SymbolRef::SF_Const)
+ if (SymFlags & SymbolRef::SF_Const)
NSect = 3;
else {
IRObjectFile *IRobj = dyn_cast<IRObjectFile>(&Obj);
- char c = getSymbolNMTypeChar(*IRobj, I->Sym);
- if (c == 't')
- NSect = 1;
- else
- NSect = 2;
+ NSect = (getSymbolNMTypeChar(*IRobj, I->Sym) == 't') ? 1 : 2;
}
}
if (SymFlags & SymbolRef::SF_Weak)