FLANG
Derived.h
1//===-- Derived.h - generate derived type runtime API calls -*- 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#ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_DERIVED_H
10#define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_DERIVED_H
11
12namespace mlir {
13class Value;
14class Location;
15} // namespace mlir
16
17namespace fir {
18class FirOpBuilder;
19class RecordType;
20} // namespace fir
21
22namespace fir::runtime {
23
26void genDerivedTypeInitialize(fir::FirOpBuilder &builder, mlir::Location loc,
27 mlir::Value box);
28
31void genDerivedTypeInitializeClone(fir::FirOpBuilder &builder,
32 mlir::Location loc, mlir::Value newBox,
33 mlir::Value box);
34
37void genDerivedTypeDestroy(fir::FirOpBuilder &builder, mlir::Location loc,
38 mlir::Value box);
39
42void genDerivedTypeFinalize(fir::FirOpBuilder &builder, mlir::Location loc,
43 mlir::Value box);
44
47void genDerivedTypeDestroyWithoutFinalization(fir::FirOpBuilder &builder,
48 mlir::Location loc,
49 mlir::Value box);
50
53void genNullifyDerivedType(fir::FirOpBuilder &builder, mlir::Location loc,
54 mlir::Value box, fir::RecordType derivedType,
55 unsigned rank = 0);
56
57mlir::Value genSameTypeAs(fir::FirOpBuilder &builder, mlir::Location loc,
58 mlir::Value a, mlir::Value b);
59
60mlir::Value genExtendsTypeOf(fir::FirOpBuilder &builder, mlir::Location loc,
61 mlir::Value a, mlir::Value b);
62
63} // namespace fir::runtime
64#endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_DERIVED_H
Definition: FIRBuilder.h:55
Definition: AbstractConverter.h:31
@ Value
Lower argument to a value. Mainly intended for scalar arguments.
Definition: AbstractConverter.h:27