| 1 |
//===----------------------------------------------------------------------===// |
| 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 file provides the LoweringPrepareCXXABI class, which is the base class |
| 10 |
// for ABI specific functionalities that are required during LLVM lowering |
| 11 |
// prepare. |
| 12 |
// |
| 13 |
//===----------------------------------------------------------------------===// |
| 14 |
|
| 15 |
#ifndef CIR_DIALECT_TRANSFORMS__LOWERINGPREPARECXXABI_H |
| 16 |
#define CIR_DIALECT_TRANSFORMS__LOWERINGPREPARECXXABI_H |
| 17 |
|
| 18 |
#include "mlir/IR/Value.h" |
| 19 |
#include "clang/AST/ASTContext.h" |
| 20 |
#include "clang/CIR/Dialect/Builder/CIRBaseBuilder.h" |
| 21 |
#include "clang/CIR/Dialect/IR/CIRDialect.h" |
| 22 |
|
| 23 |
namespace cir { |
| 24 |
|
| 25 |
class LoweringPrepareCXXABI { |
| 26 |
public: |
| 27 |
static LoweringPrepareCXXABI *createItaniumABI(); |
| 28 |
|
| 29 |
virtual ~LoweringPrepareCXXABI() {} |
| 30 |
|
| 31 |
virtual mlir::Value lowerDynamicCast(CIRBaseBuilderTy &builder, |
| 32 |
clang::ASTContext &astCtx, |
| 33 |
cir::DynamicCastOp op) = 0; |
| 34 |
}; |
| 35 |
|
| 36 |
} // namespace cir |
| 37 |
|
| 38 |
#endif // CIR_DIALECT_TRANSFORMS__LOWERINGPREPARECXXABI_H |