llvm/llvm/tools/llvm-undname/llvm-undname.cpp

//===-- llvm-undname.cpp - Microsoft ABI name undecorator
//------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This utility works like the windows undname utility. It converts mangled
// Microsoft symbol names into pretty C/C++ human-readable names.
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/StringRef.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>

usingnamespacellvm;

cl::OptionCategory UndNameCategory("UndName Options");

cl::opt<bool> DumpBackReferences("backrefs", cl::Optional,
                                 cl::desc("dump backreferences"), cl::Hidden,
                                 cl::init(false), cl::cat(UndNameCategory));
cl::opt<bool> NoAccessSpecifier("no-access-specifier", cl::Optional,
                                cl::desc("skip access specifiers"), cl::Hidden,
                                cl::init(false), cl::cat(UndNameCategory));
cl::opt<bool> NoCallingConvention("no-calling-convention", cl::Optional,
                                  cl::desc("skip calling convention"),
                                  cl::Hidden, cl::init(false),
                                  cl::cat(UndNameCategory));
cl::opt<bool> NoReturnType("no-return-type", cl::Optional,
                           cl::desc("skip return types"), cl::Hidden,
                           cl::init(false), cl::cat(UndNameCategory));
cl::opt<bool> NoMemberType("no-member-type", cl::Optional,
                           cl::desc("skip member types"), cl::Hidden,
                           cl::init(false), cl::cat(UndNameCategory));
cl::opt<bool> NoVariableType("no-variable-type", cl::Optional,
                             cl::desc("skip variable types"), cl::Hidden,
                             cl::init(false), cl::cat(UndNameCategory));
cl::opt<std::string> RawFile("raw-file", cl::Optional,
                             cl::desc("for fuzzer data"), cl::Hidden,
                             cl::cat(UndNameCategory));
cl::opt<bool> WarnTrailing("warn-trailing", cl::Optional,
                           cl::desc("warn on trailing characters"), cl::Hidden,
                           cl::init(false), cl::cat(UndNameCategory));
cl::list<std::string> Symbols(cl::Positional, cl::desc("<input symbols>"),
                              cl::cat(UndNameCategory));

static bool msDemangle(const std::string &S) {}

int main(int argc, char **argv) {}