llvm/llvm/tools/llvm-readtapi/llvm-readtapi.cpp

//===-- llvm-readtapi.cpp - tapi file reader and transformer -----*- C++-*-===//
//
// 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 file defines the command-line driver for llvm-readtapi.
//
//===----------------------------------------------------------------------===//
#include "DiffEngine.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TextAPI/DylibReader.h"
#include "llvm/TextAPI/TextAPIError.h"
#include "llvm/TextAPI/TextAPIReader.h"
#include "llvm/TextAPI/TextAPIWriter.h"
#include "llvm/TextAPI/Utils.h"
#include <cstdlib>

#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <unistd.h>
#endif

usingnamespacellvm;
usingnamespaceMachO;
usingnamespaceobject;

namespace {
usingnamespacellvm::opt;
enum ID {};

#define PREFIX
#include "TapiOpts.inc"
#undef PREFIX

static constexpr opt::OptTable::Info InfoTable[] =;

class TAPIOptTable : public opt::GenericOptTable {};

struct StubOptions {};

struct Context {};

// Use unique exit code to differentiate failures not directly caused from
// TextAPI operations. This is used for wrapping `compare` operations in
// automation and scripting.
const int NON_TAPI_EXIT_CODE =;
const std::string TOOLNAME =;
ExitOnError ExitOnErr;
} // anonymous namespace

// Handle error reporting in cases where `ExitOnError` is not used.
static void reportError(Twine Message, int ExitCode = EXIT_FAILURE) {}

// Handle warnings.
static void reportWarning(Twine Message) {}

/// Get what the symlink points to.
/// This is a no-op on windows as it references POSIX level apis.
static void read_link(const Twine &Path, SmallVectorImpl<char> &Output) {}

static std::unique_ptr<InterfaceFile>
getInterfaceFile(const StringRef Filename, bool ResetBanner = true) {}

static bool handleCompareAction(const Context &Ctx) {}

static bool handleWriteAction(const Context &Ctx,
                              std::unique_ptr<InterfaceFile> Out = nullptr) {}

static bool handleMergeAction(const Context &Ctx) {}

static void stubifyImpl(std::unique_ptr<InterfaceFile> IF, Context &Ctx) {}

static void stubifyDirectory(const StringRef InputPath, Context &Ctx) {}

static bool handleStubifyAction(Context &Ctx) {}

IFOperation;
static bool handleSingleFileAction(const Context &Ctx, const StringRef Action,
                                   IFOperation act) {}

static void setStubOptions(opt::InputArgList &Args, StubOptions &Opt) {}

int main(int Argc, char **Argv) {}