#include "Common/OptEmitter.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <cstring>
#include <map>
#include <memory>
usingnamespacellvm;
static std::string getOptionName(const Record &R) { … }
static raw_ostream &write_cstring(raw_ostream &OS, llvm::StringRef Str) { … }
static std::string getOptionPrefixedName(const Record &R) { … }
class MarshallingInfo { … };
size_t MarshallingInfo::NextTableIndex = …;
static MarshallingInfo createMarshallingInfo(const Record &R) { … }
static void EmitHelpTextsForVariants(
raw_ostream &OS, std::vector<std::pair<std::vector<std::string>, StringRef>>
HelpTextsForVariants) { … }
static void EmitOptionParser(const RecordKeeper &Records, raw_ostream &OS) { … }
static TableGen::Emitter::Opt X("gen-opt-parser-defs", EmitOptionParser,
"Generate option definitions");