[llvm] r342339 - [llvm-readobj] Make some commonly used short options visibile in -help
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 15 14:27:46 PDT 2018
Author: maskray
Date: Sat Sep 15 14:27:46 2018
New Revision: 342339
URL: http://llvm.org/viewvc/llvm-project?rev=342339&view=rev
Log:
[llvm-readobj] Make some commonly used short options visibile in -help
For people who use llvm-readelf as a replacement of GNU readelf, they would like to see -d -r ... listed in llvm-readelf -help. It also helps understanding the confusing -s (which is unfortunately different in semantics).
Reviewers: phosek, ruiu, echristo
Reviewed By: ruiu, echristo
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52129
Modified:
llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
Modified: llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp?rev=342339&r1=342338&r2=342339&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp Sat Sep 15 14:27:46 2018
@@ -594,6 +594,15 @@ int main(int argc, const char *argv[]) {
// Register the target printer for --version.
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
+ // Make some commonly used short options visibile in -help.
+ opts::DynamicTableShort.setHiddenFlag(cl::NotHidden);
+ opts::FileHeadersShort.setHiddenFlag(cl::NotHidden);
+ opts::ProgramHeadersShort.setHiddenFlag(cl::NotHidden);
+ opts::RelocationsShort.setHiddenFlag(cl::NotHidden);
+ opts::SectionsShort.setHiddenFlag(cl::NotHidden);
+ opts::SectionsShortUpper.setHiddenFlag(cl::NotHidden);
+ opts::SymbolsShort.setHiddenFlag(cl::NotHidden);
+
opts::WideOutput.setHiddenFlag(cl::Hidden);
if (sys::path::stem(argv[0]).find("readelf") != StringRef::npos)
More information about the llvm-commits
mailing list