ΒΆStringMap<llvm::cl::Option*>&
getRegisteredOptions(llvm::cl::SubCommand& Sub =
                         *TopLevelSubCommand)

Description

Use this to get a StringMap to all registered named options (e.g. -help). Access to unnamed arguments (i.e. positional) are not provided because it is expected that the client already has access to these. Typical usage: This interface is useful for modifying options in libraries that are out of the control of the client. The options should be modified before calling llvm::cl::ParseCommandLineOptions(). Hopefully this API can be deprecated soon. Any situation where options need to be modified by tools or libraries should be handled by sane APIs rather than just handing around a global list.

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

Parameters

llvm::cl::SubCommand& Sub = * TopLevelSubCommand

Returns

A reference to the StringMap used by the cl APIs to parse options.