[PATCH] D40674: Mark all library-defined command line options as hidden

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 13:33:22 PST 2017


zturner created this revision.
Herald added subscribers: hiraditya, mehdi_amini, sanjoy, qcolombet, MatzeB.

These command line options are not intended for public use, and often don't even make sense in the context of a particular tool anyway.  About 90% of them are already hidden, but when people add new options they forget to hide them, so if you were to make a brand new tool today, link against one of LLVM's libraries, and run `tool -help` you would get a bunch of junk that doesn't make sense for the tool you're writing.

This patch hides these options.  The real solution is to not have libraries defining command line options, but that's a much larger effort and not something I'm prepared to take on.


https://reviews.llvm.org/D40674

Files:
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenPGO.cpp
  llvm/lib/Analysis/LoopInfo.cpp
  llvm/lib/Analysis/ObjCARCAnalysisUtils.cpp
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/Analysis/ScopedNoAliasAA.cpp
  llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
  llvm/lib/CodeGen/ImplicitNullChecks.cpp
  llvm/lib/CodeGen/MIRPrinter.cpp
  llvm/lib/CodeGen/MachineDominators.cpp
  llvm/lib/CodeGen/RegAllocBase.cpp
  llvm/lib/CodeGen/RegAllocGreedy.cpp
  llvm/lib/CodeGen/RegisterCoalescer.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/StackMaps.cpp
  llvm/lib/CodeGen/TargetPassConfig.cpp
  llvm/lib/IR/DIBuilder.cpp
  llvm/lib/IR/Dominators.cpp
  llvm/lib/IR/LegacyPassManager.cpp
  llvm/lib/ProfileData/InstrProf.cpp
  llvm/lib/Support/RandomNumberGenerator.cpp
  llvm/lib/Support/Statistic.cpp
  llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
  llvm/lib/Target/X86/X86InstrInfo.cpp
  llvm/lib/Transforms/Utils/LCSSA.cpp
  llvm/lib/Transforms/Utils/SymbolRewriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40674.125002.patch
Type: text/x-patch
Size: 22882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171130/25dabbb2/attachment.bin>


More information about the llvm-commits mailing list