annotate lld/MachO/LTO.h @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children 5f17cb93ff66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //===- LTO.h ----------------------------------------------------*- C++ -*-===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #ifndef LLD_MACHO_LTO_H
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 #define LLD_MACHO_LTO_H
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 #include "llvm/ADT/SmallString.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #include <memory>
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 #include <vector>
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 namespace llvm {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 namespace lto {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 class LTO;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 } // namespace lto
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 } // namespace llvm
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 namespace lld {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 namespace macho {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 class BitcodeFile;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 class ObjFile;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 class BitcodeCompiler {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 public:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 BitcodeCompiler();
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 void add(BitcodeFile &f);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 std::vector<ObjFile *> compile();
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 private:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 std::unique_ptr<llvm::lto::LTO> ltoObj;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 std::vector<llvm::SmallString<0>> buf;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 };
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 } // namespace macho
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 } // namespace lld
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 #endif