class Option

Declaration

class Option { /* full declaration omitted */ };

Declared at: llvm/include/llvm/Support/CommandLine.h:254

Member Variables

public llvm::StringRef ArgStr
public llvm::StringRef HelpStr
public llvm::StringRef ValueStr
public SmallVector<llvm::cl::OptionCategory*, 1> Categories
public SmallPtrSet<llvm::cl::SubCommand*, 1> Subs

Method Overview

Methods

Option(enum NumOccurrencesFlag OccurrencesFlag,
       enum OptionHidden Hidden)

Declared at: llvm/include/llvm/Support/CommandLine.h:345

Parameters

enum NumOccurrencesFlag OccurrencesFlag
enum OptionHidden Hidden

void addArgument()

Declared at: llvm/include/llvm/Support/CommandLine.h:360

void addCategory(llvm::cl::OptionCategory& C)

Declared at: llvm/include/llvm/Support/CommandLine.h:341

Parameters

llvm::cl::OptionCategory& C

virtual bool addOccurrence(
    unsigned int pos,
    llvm::StringRef ArgName,
    llvm::StringRef Value,
    bool MultiArg = false)

Declared at: llvm/include/llvm/Support/CommandLine.h:387

Parameters

unsigned int pos
llvm::StringRef ArgName
llvm::StringRef Value
bool MultiArg = false

void addSubCommand(llvm::cl::SubCommand& S)

Declared at: llvm/include/llvm/Support/CommandLine.h:342

Parameters

llvm::cl::SubCommand& S

bool error(
    const llvm::Twine& Message,
    llvm::StringRef ArgName = llvm::StringRef(),
    llvm::raw_ostream& Errs = llvm::errs())

Declared at: llvm/include/llvm/Support/CommandLine.h:391

Parameters

const llvm::Twine& Message
llvm::StringRef ArgName = llvm::StringRef()
llvm::raw_ostream& Errs = llvm::errs()

bool error(const llvm::Twine& Message,
           llvm::raw_ostream& Errs)

Declared at: llvm/include/llvm/Support/CommandLine.h:392

Parameters

const llvm::Twine& Message
llvm::raw_ostream& Errs

virtual void getExtraOptionNames(
    SmallVectorImpl<llvm::StringRef>&)

Declared at: llvm/include/llvm/Support/CommandLine.h:383

Parameters

SmallVectorImpl<llvm::StringRef>&

inline enum FormattingFlags getFormattingFlag()
    const

Declared at: llvm/include/llvm/Support/CommandLine.h:305

inline unsigned int getMiscFlags() const

Declared at: llvm/include/llvm/Support/CommandLine.h:309

inline unsigned int getNumAdditionalVals() const

Declared at: llvm/include/llvm/Support/CommandLine.h:311

inline int getNumOccurrences() const

Declared at: llvm/include/llvm/Support/CommandLine.h:396

inline enum NumOccurrencesFlag
getNumOccurrencesFlag() const

Declared at: llvm/include/llvm/Support/CommandLine.h:293

inline enum OptionHidden getOptionHiddenFlag()
    const

Declared at: llvm/include/llvm/Support/CommandLine.h:301

virtual size_t getOptionWidth() const

Declared at: llvm/include/llvm/Support/CommandLine.h:369

inline unsigned int getPosition() const

Declared at: llvm/include/llvm/Support/CommandLine.h:310

inline enum ValueExpected getValueExpectedFlag()
    const

Declared at: llvm/include/llvm/Support/CommandLine.h:297

bool hasArgStr() const

Declared at: llvm/include/llvm/Support/CommandLine.h:314

bool isConsumeAfter() const

Declared at: llvm/include/llvm/Support/CommandLine.h:319

bool isDefaultOption() const

Declared at: llvm/include/llvm/Support/CommandLine.h:317

bool isInAllSubCommands() const

Declared at: llvm/include/llvm/Support/CommandLine.h:323

bool isPositional() const

Declared at: llvm/include/llvm/Support/CommandLine.h:315

bool isSink() const

Declared at: llvm/include/llvm/Support/CommandLine.h:316

static void printHelpStr(
    llvm::StringRef HelpStr,
    size_t Indent,
    size_t FirstLineIndentedBy)

Declared at: llvm/include/llvm/Support/CommandLine.h:380

Parameters

llvm::StringRef HelpStr
size_t Indent
size_t FirstLineIndentedBy

virtual void printOptionInfo(
    size_t GlobalWidth) const

Declared at: llvm/include/llvm/Support/CommandLine.h:374

Parameters

size_t GlobalWidth

virtual void printOptionValue(size_t GlobalWidth,
                              bool Force) const

Declared at: llvm/include/llvm/Support/CommandLine.h:376

Parameters

size_t GlobalWidth
bool Force

void removeArgument()

Description

Unregisters this option from the CommandLine system. This option must have been the last option registered. For testing purposes only.

Declared at: llvm/include/llvm/Support/CommandLine.h:366

void reset()

Declared at: llvm/include/llvm/Support/CommandLine.h:397

void setArgStr(llvm::StringRef S)

Declared at: llvm/include/llvm/Support/CommandLine.h:332

Parameters

llvm::StringRef S

virtual void setDefault()

Declared at: llvm/include/llvm/Support/CommandLine.h:378

void setDescription(llvm::StringRef S)

Declared at: llvm/include/llvm/Support/CommandLine.h:333

Parameters

llvm::StringRef S

void setFormattingFlag(enum FormattingFlags V)

Declared at: llvm/include/llvm/Support/CommandLine.h:338

Parameters

enum FormattingFlags V

void setHiddenFlag(enum OptionHidden Val)

Declared at: llvm/include/llvm/Support/CommandLine.h:337

Parameters

enum OptionHidden Val

void setMiscFlag(enum MiscFlags M)

Declared at: llvm/include/llvm/Support/CommandLine.h:339

Parameters

enum MiscFlags M

inline void setNumAdditionalVals(unsigned int n)

Declared at: llvm/include/llvm/Support/CommandLine.h:353

Parameters

unsigned int n

void setNumOccurrencesFlag(
    enum NumOccurrencesFlag Val)

Declared at: llvm/include/llvm/Support/CommandLine.h:335

Parameters

enum NumOccurrencesFlag Val

void setPosition(unsigned int pos)

Declared at: llvm/include/llvm/Support/CommandLine.h:340

Parameters

unsigned int pos

void setValueExpectedFlag(enum ValueExpected Val)

Declared at: llvm/include/llvm/Support/CommandLine.h:336

Parameters

enum ValueExpected Val

void setValueStr(llvm::StringRef S)

Declared at: llvm/include/llvm/Support/CommandLine.h:334

Parameters

llvm::StringRef S

virtual ~Option()

Declared at: llvm/include/llvm/Support/CommandLine.h:356