1 //===------------------- llvm/CodeGen/DwarfEHPrepare.h ----------*- 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 // This pass mulches exception handling code into a form adapted to code
10 // generation. Required if using dwarf exception handling.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_DWARFEHPREPARE_H
15 #define LLVM_CODEGEN_DWARFEHPREPARE_H
16 
17 #include "llvm/IR/PassManager.h"
18 
19 namespace llvm {
20 
21 class TargetMachine;
22 
23 class DwarfEHPreparePass : public PassInfoMixin<DwarfEHPreparePass> {
24   const TargetMachine *TM;
25 
26 public:
DwarfEHPreparePass(const TargetMachine * TM_)27   explicit DwarfEHPreparePass(const TargetMachine *TM_) : TM(TM_) {}
28   PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
29 };
30 
31 } // namespace llvm
32 
33 #endif // LLVM_CODEGEN_DWARFEHPREPARE_H
34