#include "llvm/ADT/StringExtras.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Demangle/StringViewExtras.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/Triple.h"
#include <cstdlib>
#include <iostream>
usingnamespacellvm;
namespace {
enum ID { … };
#define PREFIX …
#include "Opts.inc"
#undef PREFIX
usingnamespacellvm::opt;
static constexpr opt::OptTable::Info InfoTable[] = …;
class CxxfiltOptTable : public opt::GenericOptTable { … };
}
static bool ParseParams;
static bool StripUnderscore;
static bool Types;
static StringRef ToolName;
static void error(const Twine &Message) { … }
static std::string demangle(const std::string &Mangled) { … }
static void SplitStringDelims(
StringRef Source,
SmallVectorImpl<std::pair<StringRef, StringRef>> &OutFragments,
function_ref<bool(char)> IsLegalChar) { … }
static bool IsLegalItaniumChar(char C) { … }
static void demangleLine(llvm::raw_ostream &OS, StringRef Mangled, bool Split) { … }
int llvm_cxxfilt_main(int argc, char **argv, const llvm::ToolContext &) { … }