freebsd-dev/contrib/llvm-project/lld/MachO/LTO.h
Dimitry Andric fe6060f10f Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:39:49 +01:00

46 lines
1004 B
C++

//===- 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 "llvm/ADT/SmallString.h"
#include "llvm/Support/MemoryBuffer.h"
#include <memory>
#include <vector>
namespace llvm {
namespace lto {
class LTO;
} // namespace lto
} // namespace llvm
namespace lld {
namespace macho {
class BitcodeFile;
class ObjFile;
class BitcodeCompiler {
public:
BitcodeCompiler();
void add(BitcodeFile &f);
std::vector<ObjFile *> compile();
private:
std::unique_ptr<llvm::lto::LTO> ltoObj;
std::vector<llvm::SmallString<0>> buf;
std::vector<std::unique_ptr<llvm::MemoryBuffer>> files;
};
} // namespace macho
} // namespace lld
#endif