#include "TableGenBackends.h"
#include "llvm/TableGen/Error.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <cctype>
#include <cstring>
#include <map>
usingnamespacellvm;
namespace {
struct DocumentedOption { … };
struct DocumentedGroup;
struct Documentation { … };
struct DocumentedGroup : Documentation { … };
static bool hasFlag(const Record *Option, StringRef OptionFlag,
StringRef FlagsField) { … }
static bool isOptionVisible(const Record *Option, const Record *DocInfo) { … }
Documentation extractDocumentation(const RecordKeeper &Records,
const Record *DocInfo) { … }
std::pair<StringRef,StringRef> getSeparatorsForKind(const Record *OptionKind) { … }
const unsigned UnlimitedArgs = …;
unsigned getNumArgsForKind(const Record *OptionKind, const Record *Option) { … }
std::string escapeRST(StringRef Str) { … }
StringRef getSphinxOptionID(StringRef OptionName) { … }
bool canSphinxCopeWithOption(const Record *Option) { … }
void emitHeading(int Depth, std::string Heading, raw_ostream &OS) { … }
std::string getRSTStringWithTextFallback(const Record *R, StringRef Primary,
StringRef Fallback) { … }
void emitOptionWithArgs(StringRef Prefix, const Record *Option,
ArrayRef<StringRef> Args, raw_ostream &OS) { … }
constexpr StringLiteral DefaultMetaVarName = …;
void emitOptionName(StringRef Prefix, const Record *Option, raw_ostream &OS) { … }
bool emitOptionNames(const Record *Option, raw_ostream &OS, bool EmittedAny) { … }
template <typename Fn>
void forEachOptionName(const DocumentedOption &Option, const Record *DocInfo,
Fn F) { … }
void emitOption(const DocumentedOption &Option, const Record *DocInfo,
raw_ostream &OS) { … }
void emitDocumentation(int Depth, const Documentation &Doc,
const Record *DocInfo, raw_ostream &OS);
void emitGroup(int Depth, const DocumentedGroup &Group, const Record *DocInfo,
raw_ostream &OS) { … }
void emitDocumentation(int Depth, const Documentation &Doc,
const Record *DocInfo, raw_ostream &OS) { … }
}
void clang::EmitClangOptDocs(const RecordKeeper &Records, raw_ostream &OS) { … }