llvm/bolt/tools/bat-dump/bat-dump.cpp

//===- bolt/tools/bat-dump/bat-dump.cpp - BAT dumper utility --------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "bolt/Profile/BoltAddressTranslation.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/Error.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/SymbolicFile.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/raw_ostream.h"
#include <assert.h>
#include <cstdint>
#include <map>
#include <stdlib.h>
#include <string>
#include <system_error>
#include <type_traits>
#include <utility>

usingnamespacellvm;
usingnamespacebolt;

namespace opts {

cl::OptionCategory BatDumpCategory("BAT dump options");

static cl::OptionCategory *BatDumpCategories[] =;

static cl::opt<std::string> InputFilename(cl::Positional,
                                          cl::desc("<executable>"),
                                          cl::Required,
                                          cl::cat(BatDumpCategory));

static cl::list<uint64_t> Translate("translate",
                                    cl::desc("translate addresses using BAT"),
                                    cl::value_desc("addr"),
                                    cl::cat(BatDumpCategory));

static cl::opt<bool> DumpAll("dump-all", cl::desc("dump all BAT tables"),
                             cl::cat(BatDumpCategory));

} // namespace opts

static StringRef ToolName;

static void report_error(StringRef Message, std::error_code EC) {}

static void report_error(StringRef Message, Error E) {}

static std::string GetExecutablePath(const char *Argv0) {}

void dumpBATFor(llvm::object::ELFObjectFileBase *InputFile) {}

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