mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
21f831134c
Just enough to consume some bitcode files and link them. There's more to be done around the symbol resolution API and the LTO config, but I don't yet understand what all the various LTO settings do... Reviewed By: #lld-macho, compnerd, smeenai, MaskRay Differential Revision: https://reviews.llvm.org/D90663
44 lines
907 B
C++
44 lines
907 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 <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;
|
|
};
|
|
|
|
} // namespace macho
|
|
} // namespace lld
|
|
|
|
#endif
|