diff options
author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2020-04-06 16:56:13 -0400 |
---|---|---|
committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2020-04-06 16:58:01 -0400 |
commit | 076308a4b575d488440d7e715965e9d1c0adb9bb (patch) | |
tree | ed711b8ae06b0489786a520575992d9b2760270a /llvm/tools/llvm-objdump/llvm-objdump.h | |
parent | 0c9f750a132898d2a90382806ce2662321207c98 (diff) | |
download | llvm-076308a4b575d488440d7e715965e9d1c0adb9bb.zip llvm-076308a4b575d488440d7e715965e9d1c0adb9bb.tar.gz llvm-076308a4b575d488440d7e715965e9d1c0adb9bb.tar.bz2 |
[llvm-objdump][NFC] Declare command-line externs in headers with namespace
Summary:
This patch moves the forward declarations of command-line `cl::*`
externs in `MachODump.cpp` and `llvm-objdump.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
that are not referenced outside their defining translation unit are made
static.
This does not factor out uses of the Mach-O options from
`llvm-objdump.cpp`.
Reviewers: jhenderson, MaskRay, DiggerLin, jasonliu, daltenty
Reviewed By: jhenderson, MaskRay
Subscribers: rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77388
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.h')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.h b/llvm/tools/llvm-objdump/llvm-objdump.h index 429a607..5b74c1d 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.h +++ b/llvm/tools/llvm-objdump/llvm-objdump.h @@ -23,9 +23,30 @@ class ELFSectionRef; class MachOObjectFile; class MachOUniversalBinary; class RelocationRef; -} +} // namespace object + +namespace objdump { +extern cl::opt<bool> ArchiveHeaders; extern cl::opt<bool> Demangle; +extern cl::opt<bool> Disassemble; +extern cl::opt<bool> DisassembleAll; +extern cl::opt<DIDumpType> DwarfDumpType; +extern cl::list<std::string> FilterSections; +extern cl::list<std::string> MAttrs; +extern cl::opt<std::string> MCPU; +extern cl::opt<bool> NoShowRawInsn; +extern cl::opt<bool> NoLeadingAddr; +extern cl::opt<bool> PrintImmHex; +extern cl::opt<bool> PrivateHeaders; +extern cl::opt<bool> Relocations; +extern cl::opt<bool> SectionHeaders; +extern cl::opt<bool> SectionContents; +extern cl::opt<bool> SymbolTable; +extern cl::opt<std::string> TripleName; +extern cl::opt<bool> UnwindInfo; + +} // namespace objdump typedef std::function<bool(llvm::object::SectionRef const &)> FilterPredicate; |