221
|
1 //===- LTO.h ----------------------------------------------------*- C++ -*-===//
|
|
2 //
|
|
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
4 // See https://llvm.org/LICENSE.txt for license information.
|
|
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
6 //
|
|
7 //===----------------------------------------------------------------------===//
|
|
8
|
|
9 #ifndef LLD_MACHO_LTO_H
|
|
10 #define LLD_MACHO_LTO_H
|
|
11
|
|
12 #include "llvm/ADT/SmallString.h"
|
|
13 #include <memory>
|
|
14 #include <vector>
|
|
15
|
|
16 namespace llvm {
|
|
17 namespace lto {
|
|
18 class LTO;
|
|
19 } // namespace lto
|
|
20 } // namespace llvm
|
|
21
|
|
22 namespace lld {
|
|
23 namespace macho {
|
|
24
|
|
25 class BitcodeFile;
|
|
26 class ObjFile;
|
|
27
|
|
28 class BitcodeCompiler {
|
|
29 public:
|
|
30 BitcodeCompiler();
|
|
31
|
|
32 void add(BitcodeFile &f);
|
|
33 std::vector<ObjFile *> compile();
|
|
34
|
|
35 private:
|
|
36 std::unique_ptr<llvm::lto::LTO> ltoObj;
|
|
37 std::vector<llvm::SmallString<0>> buf;
|
|
38 };
|
|
39
|
|
40 } // namespace macho
|
|
41 } // namespace lld
|
|
42
|
|
43 #endif
|