summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-nm/llvm-nm.cpp
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2015-10-30 19:55:32 +0000
committerKevin Enderby <enderby@apple.com>2015-10-30 19:55:32 +0000
commit1543bdf4509c9001fd635fe24204b6d429603ff4 (patch)
tree27040612264de141cfb0de99bafcc18863314a57 /llvm/tools/llvm-nm/llvm-nm.cpp
parenta49cfd8f946160a82d70ebe6e8b3d7658c07c68f (diff)
downloadbcm5719-llvm-1543bdf4509c9001fd635fe24204b6d429603ff4.tar.gz
bcm5719-llvm-1543bdf4509c9001fd635fe24204b6d429603ff4.zip
Implemented the code to make llvm-nm’s -g option work.
While llvm-nm parses the -g option and has help that describes it as: -extern-only - Show only external symbols There is no code in the program to use the boolean valve it sets from the command line. rdar://23261095 llvm-svn: 251718
Diffstat (limited to 'llvm/tools/llvm-nm/llvm-nm.cpp')
-rw-r--r--llvm/tools/llvm-nm/llvm-nm.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp
index a0b5e9b4eaa..9d0cc575843 100644
--- a/llvm/tools/llvm-nm/llvm-nm.cpp
+++ b/llvm/tools/llvm-nm/llvm-nm.cpp
@@ -529,6 +529,9 @@ static void sortAndPrintSymbolList(SymbolicFile &Obj, bool printName,
continue;
if (Undefined && DefinedOnly)
continue;
+ bool Global = SymFlags & SymbolRef::SF_Global;
+ if (!Global && ExternalOnly)
+ continue;
if (SizeSort && !PrintAddress)
continue;
if (PrintFileName) {
OpenPOWER on IntegriCloud