LLVM 20.0.0git
Functions
OptTable.cpp File Reference
#include "llvm/Option/OptTable.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptSpecifier.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/OptionStrCmp.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstring>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Functions

static bool isInput (const ArrayRef< StringRef > &Prefixes, StringRef Arg)
 
static unsigned matchOption (const char *StrTable, ArrayRef< unsigned > PrefixesTable, const OptTable::Info *I, StringRef Str, bool IgnoreCase)
 
static bool optionMatches (const char *StrTable, ArrayRef< unsigned > PrefixesTable, const OptTable::Info &In, StringRef Option)
 
static std::string getOptionHelpName (const OptTable &Opts, OptSpecifier Id)
 
static void PrintHelpOptionList (raw_ostream &OS, StringRef Title, std::vector< OptionInfo > &OptionHelp)
 
static const chargetOptionHelpGroup (const OptTable &Opts, OptSpecifier Id)
 

Function Documentation

◆ getOptionHelpGroup()

static const char * getOptionHelpGroup ( const OptTable Opts,
OptSpecifier  Id 
)
static

◆ getOptionHelpName()

static std::string getOptionHelpName ( const OptTable Opts,
OptSpecifier  Id 
)
static

◆ isInput()

static bool isInput ( const ArrayRef< StringRef > &  Prefixes,
StringRef  Arg 
)
static

Definition at line 144 of file OptTable.cpp.

◆ matchOption()

static unsigned matchOption ( const char StrTable,
ArrayRef< unsigned PrefixesTable,
const OptTable::Info I,
StringRef  Str,
bool  IgnoreCase 
)
static
Returns
Matched size. 0 means no match.

Definition at line 154 of file OptTable.cpp.

References I, Name, llvm::StringRef::starts_with(), and llvm::StringRef::starts_with_insensitive().

◆ optionMatches()

static bool optionMatches ( const char StrTable,
ArrayRef< unsigned PrefixesTable,
const OptTable::Info In,
StringRef  Option 
)
static

Definition at line 173 of file OptTable.cpp.

References Name.

Referenced by llvm::opt::OptTable::suggestValueCompletions().

◆ PrintHelpOptionList()

static void PrintHelpOptionList ( raw_ostream OS,
StringRef  Title,
std::vector< OptionInfo > &  OptionHelp 
)
static

Definition at line 659 of file OptTable.cpp.

References assert(), llvm::raw_ostream::indent(), llvm::Length, and OS.