[PATCH] D77388: [llvm-objdump][NFC] Declare command-line externs in headers with namespace

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 06:57:19 PDT 2020


hubert.reinterpretcast created this revision.
hubert.reinterpretcast added reviewers: jhenderson, MaskRay, DiggerLin, jasonliu, daltenty.
Herald added a subscriber: rupprecht.
Herald added a project: LLVM.

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`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77388

Files:
  llvm/tools/llvm-objdump/ELFDump.cpp
  llvm/tools/llvm-objdump/MachODump.cpp
  llvm/tools/llvm-objdump/MachODump.h
  llvm/tools/llvm-objdump/llvm-objdump.cpp
  llvm/tools/llvm-objdump/llvm-objdump.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77388.254775.patch
Type: text/x-patch
Size: 22084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200403/0bd27249/attachment.bin>


More information about the llvm-commits mailing list