aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorHubert Tong <hubert.reinterpretcast@gmail.com>2020-04-09 15:32:09 -0400
committerHubert Tong <hubert.reinterpretcast@gmail.com>2020-04-09 15:35:33 -0400
commitc6f13ce580756da6d82497d84d277abdc5ab753c (patch)
tree34c514eaea0074a1587ab7e58c95ea5fa6f318c6 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent64868cbfcf7b56288973bb258fc47422bee46c15 (diff)
downloadllvm-c6f13ce580756da6d82497d84d277abdc5ab753c.zip
llvm-c6f13ce580756da6d82497d84d277abdc5ab753c.tar.gz
llvm-c6f13ce580756da6d82497d84d277abdc5ab753c.tar.bz2
[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
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp6
1 files changed, 3 insertions, 3 deletions
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).