//===- COFFImportFile.h - COFF short import file implementation -*- 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 // //===----------------------------------------------------------------------===// // // COFF short import file is a special kind of file which contains // only symbol names for DLL-exported symbols. This class implements // exporting of Symbols to create libraries and a SymbolicFile // interface for the file type. // //===----------------------------------------------------------------------===// #ifndef LLVM_OBJECT_COFFIMPORTFILE_H #define LLVM_OBJECT_COFFIMPORTFILE_H #include "llvm/ADT/ArrayRef.h" #include "llvm/IR/Mangler.h" #include "llvm/Object/COFF.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Object/SymbolicFile.h" #include "llvm/Support/MemoryBufferRef.h" #include "llvm/Support/raw_ostream.h" namespace llvm { namespace object { constexpr std::string_view ImportDescriptorPrefix = …; constexpr std::string_view NullImportDescriptorSymbolName = …; constexpr std::string_view NullThunkDataPrefix = …; constexpr std::string_view NullThunkDataSuffix = …; class COFFImportFile : public SymbolicFile { … }; struct COFFShortExport { … }; /// Writes a COFF import library containing entries described by the Exports /// array. /// /// For hybrid targets such as ARM64EC, additional native entry points can be /// exposed using the NativeExports parameter. When NativeExports is used, the /// output import library will expose these native ARM64 imports alongside the /// entries described in the Exports array. Such a library can be used for /// linking both ARM64EC and pure ARM64 objects, and the linker will pick only /// the exports relevant to the target platform. For non-hybrid targets, /// the NativeExports parameter should not be used. Error writeImportLibrary(StringRef ImportName, StringRef Path, ArrayRef<COFFShortExport> Exports, COFF::MachineTypes Machine, bool MinGW, ArrayRef<COFFShortExport> NativeExports = { … }; } // namespace object } // namespace llvm #endif