Ignore:
Timestamp:
May 4, 2016, 11:50:51 AM (3 years ago)
Author:
cameron
Message:

Updates for LLVM 3.8; hide unrelated command line options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/wc.cpp

    r5021 r5026  
    5252
    5353#include <fcntl.h>
    54 
    55 static cl::list<std::string> inputFiles(cl::Positional, cl::desc("<input file ...>"), cl::OneOrMore);
    56 
    57 static cl::opt<bool> CountLines("l", cl::desc("Report the number of lines in each input file."), cl::init(false));
    58 static cl::opt<bool> CountWords("w", cl::desc("Report the number of lines in each input file."), cl::init(false));
    59 static cl::opt<bool> CountBytes("c", cl::desc("Report the number of bytes in each input file."), cl::init(false));
    60 static cl::opt<bool> CountChars("m", cl::desc("Report the number of characters in each input file."), cl::init(false));
     54static cl::OptionCategory wcFlags("Command Flags", "wc options");
     55
     56static cl::list<std::string> inputFiles(cl::Positional, cl::desc("<input file ...>"), cl::OneOrMore, cl::cat(wcFlags));
     57
     58static cl::opt<bool> CountLines("l", cl::desc("Report the number of lines in each input file."), cl::init(false), cl::cat(wcFlags));
     59static cl::opt<bool> CountWords("w", cl::desc("Report the number of lines in each input file."), cl::init(false), cl::cat(wcFlags));
     60static cl::opt<bool> CountBytes("c", cl::desc("Report the number of bytes in each input file."), cl::init(false), cl::cat(wcFlags));
     61static cl::opt<bool> CountChars("m", cl::desc("Report the number of characters in each input file."), cl::init(false), cl::cat(wcFlags));
    6162
    6263
     
    438439
    439440int main(int argc, char *argv[]) {
    440     StringMap<cl::Option*> Map;
    441     cl::getRegisteredOptions(Map);
    442     Map["time-passes"]->setHiddenFlag(cl::Hidden);
    443     Map["disable-spill-fusing"]->setHiddenFlag(cl::Hidden);
    444     Map["enable-misched"]->setHiddenFlag(cl::Hidden);
    445     Map["enable-tbaa"]->setHiddenFlag(cl::Hidden);
    446     Map["exhaustive-register-search"]->setHiddenFlag(cl::Hidden);
    447     Map["join-liveintervals"]->setHiddenFlag(cl::Hidden);
    448     Map["limit-float-precision"]->setHiddenFlag(cl::Hidden);
    449     Map["mc-x86-disable-arith-relaxation"]->setHiddenFlag(cl::Hidden);
    450     Map["limit-float-precision"]->setHiddenFlag(cl::Hidden);
    451     Map["print-after-all"]->setHiddenFlag(cl::Hidden);
    452     Map["print-before-all"]->setHiddenFlag(cl::Hidden);
    453     Map["print-machineinstrs"]->setHiddenFlag(cl::Hidden);
    454     Map["regalloc"]->setHiddenFlag(cl::Hidden);
    455     Map["rng-seed"]->setHiddenFlag(cl::Hidden);
    456     Map["stackmap-version"]->setHiddenFlag(cl::Hidden);
    457     Map["x86-asm-syntax"]->setHiddenFlag(cl::Hidden);
    458     Map["verify-debug-info"]->setHiddenFlag(cl::Hidden);
    459     Map["verify-dom-info"]->setHiddenFlag(cl::Hidden);
    460     Map["verify-loop-info"]->setHiddenFlag(cl::Hidden);
    461     Map["verify-regalloc"]->setHiddenFlag(cl::Hidden);
    462     Map["verify-scev"]->setHiddenFlag(cl::Hidden);
    463     Map["x86-recip-refinement-steps"]->setHiddenFlag(cl::Hidden);
    464     Map["rewrite-map-file"]->setHiddenFlag(cl::Hidden);
     441    HideUnrelatedOptions(wcFlags);
    465442
    466443    cl::ParseCommandLineOptions(argc, argv);
Note: See TracChangeset for help on using the changeset viewer.