Path: blob/main/contrib/llvm-project/lld/MachO/LTO.h
34878 views
//===- LTO.h ----------------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLD_MACHO_LTO_H9#define LLD_MACHO_LTO_H1011#include "lld/Common/LLVM.h"12#include "llvm/ADT/DenseSet.h"13#include "llvm/ADT/SmallString.h"14#include "llvm/Support/MemoryBuffer.h"15#include "llvm/Support/raw_ostream.h"16#include <memory>17#include <vector>1819namespace llvm::lto {20class LTO;21} // namespace llvm::lto2223namespace lld::macho {2425class BitcodeFile;26class ObjFile;2728class BitcodeCompiler {29public:30BitcodeCompiler();3132void add(BitcodeFile &f);33std::vector<ObjFile *> compile();3435private:36std::unique_ptr<llvm::lto::LTO> ltoObj;37std::vector<llvm::SmallString<0>> buf;38std::vector<std::unique_ptr<llvm::MemoryBuffer>> files;39std::unique_ptr<llvm::raw_fd_ostream> indexFile;40llvm::DenseSet<StringRef> thinIndices;41bool hasFiles = false;42};4344} // namespace lld::macho4546#endif474849