//===- LTO.h ----------------------------------------------------*- 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 // //===----------------------------------------------------------------------===// #ifndef LLD_MACHO_LTO_H #define LLD_MACHO_LTO_H #include "lld/Common/LLVM.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" #include #include namespace llvm::lto { class LTO; } // namespace llvm::lto namespace lld::macho { class BitcodeFile; class ObjFile; class BitcodeCompiler { public: BitcodeCompiler(); void add(BitcodeFile &f); std::vector compile(); private: std::unique_ptr ltoObj; std::vector> buf; std::vector> files; std::unique_ptr indexFile; llvm::DenseSet thinIndices; bool hasFiles = false; }; } // namespace lld::macho #endif