#include "llvm/Transforms/Coroutines/CoroCleanup.h"
#include "CoroInternal.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
struct Lowerer : coro::LowererBase { … };
}
static void lowerSubFn(IRBuilder<> &Builder, CoroSubFnInst *SubFn) { … }
bool Lowerer::lower(Function &F) { … }
static bool declaresCoroCleanupIntrinsics(const Module &M) { … }
PreservedAnalyses CoroCleanupPass::run(Module &M,
ModuleAnalysisManager &MAM) { … }