llvm/lld/MachO/DriverUtils.cpp

//===- DriverUtils.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
//
//===----------------------------------------------------------------------===//

#include "Config.h"
#include "Driver.h"
#include "InputFiles.h"
#include "ObjC.h"
#include "Target.h"

#include "lld/Common/Args.h"
#include "lld/Common/CommonLinkerContext.h"
#include "lld/Common/Reproduce.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/LTO/LTO.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/TextAPI/InterfaceFile.h"
#include "llvm/TextAPI/TextAPIReader.h"

usingnamespacellvm;
usingnamespacellvm::MachO;
usingnamespacellvm::opt;
usingnamespacellvm::sys;
usingnamespacelld;
usingnamespacelld::macho;

// Create prefix string literals used in Options.td
#define PREFIX
#include "Options.inc"
#undef PREFIX

// Create table mapping all options defined in Options.td
static constexpr OptTable::Info optInfo[] =;

MachOOptTable::MachOOptTable() :{}

// Set color diagnostics according to --color-diagnostics={auto,always,never}
// or --no-color-diagnostics flags.
static void handleColorDiagnostics(InputArgList &args) {}

InputArgList MachOOptTable::parse(ArrayRef<const char *> argv) {}

void MachOOptTable::printHelp(const char *argv0, bool showHidden) const {}

static std::string rewritePath(StringRef s) {}

static std::string rewriteInputPath(StringRef s) {}

// Reconstructs command line arguments so that so that you can re-run
// the same command with the same inputs. This is for --reproduce.
std::string macho::createResponseFile(const InputArgList &args) {}

static void searchedDylib(const Twine &path, bool found) {}

std::optional<StringRef> macho::resolveDylibPath(StringRef dylibPath) {}

// It's not uncommon to have multiple attempts to load a single dylib,
// especially if it's a commonly re-exported core library.
static DenseMap<CachedHashStringRef, DylibFile *> loadedDylibs;

DylibFile *macho::loadDylib(MemoryBufferRef mbref, DylibFile *umbrella,
                            bool isBundleLoader, bool explicitlyLinked) {}

void macho::resetLoadedDylibs() {}

std::optional<StringRef>
macho::findPathCombination(const Twine &name,
                           const std::vector<StringRef> &roots,
                           ArrayRef<StringRef> extensions) {}

StringRef macho::rerootPath(StringRef path) {}

uint32_t macho::getModTime(StringRef path) {}

void macho::printArchiveMemberLoad(StringRef reason, const InputFile *f) {}

macho::DependencyTracker::DependencyTracker(StringRef path)
    :{}

void macho::DependencyTracker::write(StringRef version,
                                     const SetVector<InputFile *> &inputs,
                                     StringRef output) {}