#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 CompareOptions { … };
struct Context { … };
const int NON_TAPI_EXIT_CODE = …;
const std::string TOOLNAME = …;
ExitOnError ExitOnErr;
}
static void reportError(Twine Message, int ExitCode = EXIT_FAILURE) { … }
static void reportWarning(Twine Message) { … }
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) { … }