LLVM 22.0.0git
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 StringTable &StrTable, ArrayRef< StringTable::Offset > PrefixesTable, const OptTable::Info *I, StringRef Str, bool IgnoreCase)
static bool optionMatches (const StringTable &StrTable, ArrayRef< StringTable::Offset > 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()

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

◆ getOptionHelpName()

◆ isInput()

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

Definition at line 146 of file OptTable.cpp.

Referenced by llvm::Dependence::dump(), and llvm::Dependence::isUnordered().

◆ matchOption()

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

Definition at line 156 of file OptTable.cpp.

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

◆ optionMatches()

bool optionMatches ( const StringTable & StrTable,
ArrayRef< StringTable::Offset > PrefixesTable,
const OptTable::Info & In,
StringRef Option )
static

Definition at line 175 of file OptTable.cpp.

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

◆ PrintHelpOptionList()

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

Definition at line 661 of file OptTable.cpp.

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