1 //===- CoroSplit.h - Converts a coroutine into a state machine -*- 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 // \file
10 // This file declares the pass that builds the coroutine frame and outlines
11 // the resume and destroy parts of the coroutine into separate functions.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_TRANSFORMS_COROUTINES_COROSPLIT_H
16 #define LLVM_TRANSFORMS_COROUTINES_COROSPLIT_H
17 
18 #include "llvm/Analysis/CGSCCPassManager.h"
19 #include "llvm/Analysis/LazyCallGraph.h"
20 #include "llvm/IR/PassManager.h"
21 
22 namespace llvm {
23 
24 struct CoroSplitPass : PassInfoMixin<CoroSplitPass> {
25   PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM,
26                         LazyCallGraph &CG, CGSCCUpdateResult &UR);
27 };
28 } // end namespace llvm
29 
30 #endif // LLVM_TRANSFORMS_COROUTINES_COROSPLIT_H
31