[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / include / llvm / Transforms / IPO / ThinLTOBitcodeWriter.h
blob7acb922b37e12304b4206c8acf40840b543ebae9
1 //===- ThinLTOBitcodeWriter.h - Bitcode writing pass for ThinLTO ----------===//
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 // This pass prepares a module containing type metadata for ThinLTO by splitting
10 // it into regular and thin LTO parts if possible, and writing both parts to
11 // a multi-module bitcode file. Modules that do not contain type metadata are
12 // written unmodified as a single module.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TRANSFORMS_IPO_THINLTOBITCODEWRITER_H
17 #define LLVM_TRANSFORMS_IPO_THINLTOBITCODEWRITER_H
19 #include <llvm/IR/PassManager.h>
20 #include <llvm/Support/raw_ostream.h>
22 namespace llvm {
24 class ThinLTOBitcodeWriterPass
25 : public PassInfoMixin<ThinLTOBitcodeWriterPass> {
26 raw_ostream &OS;
27 raw_ostream *ThinLinkOS;
29 public:
30 // Writes bitcode to OS. Also write thin link file to ThinLinkOS, if
31 // it's not nullptr.
32 ThinLTOBitcodeWriterPass(raw_ostream &OS, raw_ostream *ThinLinkOS)
33 : OS(OS), ThinLinkOS(ThinLinkOS) {}
35 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
38 } // namespace llvm
40 #endif