From c6f13ce580756da6d82497d84d277abdc5ab753c Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Thu, 9 Apr 2020 15:32:09 -0400 Subject: [llvm-objdump][NFC] MachODump.cpp interface cleanup Continuing from D77388, this patch moves interface declarations associated with `MachODump.cpp` into the headers corresponding to the file that defines the variable. At the same time, these externs are moved into the `llvm::objdump` namespace. The externs defined in `MachODump.cpp` that are not referenced outside of it are given internal linkage. This patch does not rename the external functions defined by `MachODump.cpp` that are not clearly named as being specific to Mach-O. Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D77730 --- llvm/tools/llvm-objdump/llvm-objdump.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp') diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 2f9c6f1..f407f14 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -345,10 +345,8 @@ static cl::alias WideShort("w", cl::Grouping, cl::aliasopt(Wide)); static cl::extrahelp HelpResponse("\nPass @FILE as argument to read options from FILE.\n"); -namespace llvm { - static StringSet<> DisasmSymbolSet; -StringSet<> FoundSectionSet; +StringSet<> objdump::FoundSectionSet; static StringRef ToolName; namespace { @@ -386,6 +384,8 @@ static FilterResult checkSectionFilter(object::SectionRef S) { /*IncrementIndex=*/true}; } +namespace llvm { + SectionFilter ToolSectionFilter(object::ObjectFile const &O, uint64_t *Idx) { // Start at UINT64_MAX so that the first index returned after an increment is // zero (after the unsigned wrap). -- cgit v1.1