llvm/llvm/lib/Object/COFFImportFile.cpp

//===- COFFImportFile.cpp - COFF short import file implementation ---------===//
//
// 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 writeImportLibrary function.
//
//===----------------------------------------------------------------------===//

#include "llvm/Object/COFFImportFile.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/ArchiveWriter.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Path.h"

#include <cstdint>
#include <string>
#include <vector>

usingnamespacellvm::COFF;
usingnamespacellvm::object;
usingnamespacellvm;

namespace llvm {
namespace object {

StringRef COFFImportFile::getFileFormatName() const {}

static StringRef applyNameType(ImportNameType Type, StringRef name) {}

StringRef COFFImportFile::getExportName() const {}

Error COFFImportFile::printSymbolName(raw_ostream &OS, DataRefImpl Symb) const {}

static uint16_t getImgRelRelocation(MachineTypes Machine) {}

template <class T> static void append(std::vector<uint8_t> &B, const T &Data) {}

static void writeStringTable(std::vector<uint8_t> &B,
                             ArrayRef<const std::string_view> Strings) {}

static ImportNameType getNameType(StringRef Sym, StringRef ExtName,
                                  MachineTypes Machine, bool MinGW) {}

static Expected<std::string> replace(StringRef S, StringRef From,
                                     StringRef To) {}

namespace {
// This class constructs various small object files necessary to support linking
// symbols imported from a DLL.  The contents are pretty strictly defined and
// nearly entirely static.  The details of the structures files are defined in
// WINNT.h and the PE/COFF specification.
class ObjectFactory {};
} // namespace

NewArchiveMember
ObjectFactory::createImportDescriptor(std::vector<uint8_t> &Buffer) {}

NewArchiveMember
ObjectFactory::createNullImportDescriptor(std::vector<uint8_t> &Buffer) {}

NewArchiveMember ObjectFactory::createNullThunk(std::vector<uint8_t> &Buffer) {}

NewArchiveMember
ObjectFactory::createShortImport(StringRef Sym, uint16_t Ordinal,
                                 ImportType ImportType, ImportNameType NameType,
                                 StringRef ExportName, MachineTypes Machine) {}

NewArchiveMember ObjectFactory::createWeakExternal(StringRef Sym,
                                                   StringRef Weak, bool Imp,
                                                   MachineTypes Machine) {}

Error writeImportLibrary(StringRef ImportName, StringRef Path,
                         ArrayRef<COFFShortExport> Exports,
                         MachineTypes Machine, bool MinGW,
                         ArrayRef<COFFShortExport> NativeExports) {}

} // namespace object
} // namespace llvm