//===-ThinLTOCodeGenerator.h - LLVM Link Time Optimizer -------------------===// // // 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 // //===----------------------------------------------------------------------===// // // This file declares the ThinLTOCodeGenerator class, similar to the // LTOCodeGenerator but for the ThinLTO scheme. It provides an interface for // linker plugin. // //===----------------------------------------------------------------------===// #ifndef LLVM_LTO_LEGACY_THINLTOCODEGENERATOR_H #define LLVM_LTO_LEGACY_THINLTOCODEGENERATOR_H #include "llvm-c/lto.h" #include "llvm/ADT/StringSet.h" #include "llvm/IR/ModuleSummaryIndex.h" #include "llvm/LTO/LTO.h" #include "llvm/Support/CachePruning.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Target/TargetOptions.h" #include "llvm/TargetParser/Triple.h" #include <string> namespace llvm { class StringRef; class TargetMachine; /// Helper to gather options relevant to the target machine creation struct TargetMachineBuilder { … }; /// This class define an interface similar to the LTOCodeGenerator, but adapted /// for ThinLTO processing. /// The ThinLTOCodeGenerator is not intended to be reuse for multiple /// compilation: the model is that the client adds modules to the generator and /// ask to perform the ThinLTO optimizations / codegen, and finally destroys the /// codegenerator. class ThinLTOCodeGenerator { … }; } #endif