#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TableGen/Main.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/SetTheory.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <cassert>
#include <string>
#include <vector>
usingnamespacellvm;
namespace llvm {
cl::opt<bool> EmitLongStrLiterals(
"long-string-literals",
cl::desc("when emitting large string tables, prefer string literals over "
"comma-separated char literals. This can be a readability and "
"compile-time performance win, but upsets some compilers"),
cl::Hidden, cl::init(true));
}
static cl::OptionCategory PrintEnumsCat("Options for -print-enums");
static cl::opt<std::string> Class("class",
cl::desc("Print Enum list for this class"),
cl::value_desc("class name"),
cl::cat(PrintEnumsCat));
static void PrintRecords(const RecordKeeper &Records, raw_ostream &OS) { … }
static void PrintEnums(const RecordKeeper &Records, raw_ostream &OS) { … }
static void PrintSets(const RecordKeeper &Records, raw_ostream &OS) { … }
static TableGen::Emitter::Opt X[] = …;
int main(int argc, char **argv) { … }
#ifndef __has_feature
#define __has_feature …
#endif
#if __has_feature(address_sanitizer) || \
(defined(__SANITIZE_ADDRESS__) && defined(__GNUC__)) || \
__has_feature(leak_sanitizer)
#include <sanitizer/lsan_interface.h>
LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
#endif