llvm/llvm/tools/llvm-cxxmap/llvm-cxxmap.cpp

//===- llvm-cxxmap.cpp ----------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// llvm-cxxmap computes a correspondence between old symbol names and new
// symbol names based on a symbol equivalence file.
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ProfileData/SymbolRemappingReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"

usingnamespacellvm;

cl::OptionCategory CXXMapCategory("CXX Map Options");

cl::opt<std::string> OldSymbolFile(cl::Positional, cl::Required,
                                   cl::desc("<symbol-file>"),
                                   cl::cat(CXXMapCategory));
cl::opt<std::string> NewSymbolFile(cl::Positional, cl::Required,
                                   cl::desc("<symbol-file>"),
                                   cl::cat(CXXMapCategory));
cl::opt<std::string> RemappingFile("remapping-file", cl::Required,
                                   cl::desc("Remapping file"),
                                   cl::cat(CXXMapCategory));
cl::alias RemappingFileA("r", cl::aliasopt(RemappingFile),
                         cl::cat(CXXMapCategory));
cl::opt<std::string> OutputFilename("output", cl::value_desc("output"),
                                    cl::init("-"), cl::desc("Output file"),
                                    cl::cat(CXXMapCategory));
cl::alias OutputFilenameA("o", cl::aliasopt(OutputFilename),
                          cl::cat(CXXMapCategory));

cl::opt<bool> WarnAmbiguous(
    "Wambiguous",
    cl::desc("Warn on equivalent symbols in the output symbol list"),
    cl::cat(CXXMapCategory));
cl::opt<bool> WarnIncomplete(
    "Wincomplete",
    cl::desc("Warn on input symbols missing from output symbol list"),
    cl::cat(CXXMapCategory));

static void warn(Twine Message, Twine Whence = "",
                 std::string Hint = "") {}

static void exitWithError(Twine Message, Twine Whence = "",
                          std::string Hint = "") {}

static void exitWithError(Error E, StringRef Whence = "") {}

static void exitWithErrorCode(std::error_code EC, StringRef Whence = "") {}

static void remapSymbols(MemoryBuffer &OldSymbolFile,
                         MemoryBuffer &NewSymbolFile,
                         MemoryBuffer &RemappingFile,
                         raw_ostream &Out) {}

int main(int argc, const char *argv[]) {}