[NFC] Refactor llvm-nm symbol comparing and split sorting
authorzhijian <zhijian@ca.ibm.com>
Tue, 8 Feb 2022 15:57:04 +0000 (10:57 -0500)
committerzhijian <zhijian@ca.ibm.com>
Tue, 8 Feb 2022 15:57:04 +0000 (10:57 -0500)
commitd11915b5c73ec294695b761fdd3555a6b03d821f
tree388ae977f5c47633e44ecaaa81584acb17a163da
parent905abc5b7db27fa26f49f668b47a57b462be24c9
[NFC] Refactor llvm-nm symbol comparing and split sorting
Summary:
1.added a helper function isSymbolDefined().
2.Split out sorting code
3.refactor symbol comparing function

Reviewers: James Henderson,Fangrui Song
Differential Revision: https://reviews.llvm.org/D119028
llvm/tools/llvm-nm/llvm-nm.cpp