FLANG
runtime-type-info.h
1//===-- include/flang/Semantics/runtime-type-info.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// BuildRuntimeDerivedTypeTables() translates the scopes of derived types
10// and parameterized derived type instantiations into the type descriptions
11// defined in module/__fortran_type_info.f90, packaging these descriptions
12// as static initializers for compiler-created objects.
13
14#ifndef FORTRAN_SEMANTICS_RUNTIME_TYPE_INFO_H_
15#define FORTRAN_SEMANTICS_RUNTIME_TYPE_INFO_H_
16
17#include "flang/Common/reference.h"
18#include "flang/Semantics/symbol.h"
19#include <map>
20#include <set>
21#include <string>
22#include <vector>
23
24namespace llvm {
25class raw_ostream;
26}
27
28namespace Fortran::semantics {
29
31 Scope *schemata{nullptr};
32 std::set<std::string> names;
33};
34
35RuntimeDerivedTypeTables BuildRuntimeDerivedTypeTables(SemanticsContext &);
36
39constexpr char typeInfoBuiltinModule[]{"__fortran_type_info"};
40
43constexpr char bindingDescCompName[]{"binding"};
44
47constexpr char procCompName[]{"proc"};
48
49SymbolVector CollectBindings(const Scope &dtScope);
50
52 const Symbol *subroutine;
53 common::DefinedIo definedIo;
54 bool isDtvArgPolymorphic;
55};
56
57std::multimap<const Symbol *, NonTbpDefinedIo>
58CollectNonTbpDefinedIoGenericInterfaces(
59 const Scope &, bool useRuntimeTypeInfoEntries);
60
61bool ShouldIgnoreRuntimeTypeInfoNonTbpGenericInterfaces(
62 const Scope &, const DerivedTypeSpec *);
63bool ShouldIgnoreRuntimeTypeInfoNonTbpGenericInterfaces(
64 const Scope &, const DeclTypeSpec *);
65bool ShouldIgnoreRuntimeTypeInfoNonTbpGenericInterfaces(
66 const Scope &, const Symbol *);
67
68} // namespace Fortran::semantics
69#endif // FORTRAN_SEMANTICS_RUNTIME_TYPE_INFO_H_
Definition: type.h:353
Definition: scope.h:58
Definition: semantics.h:67
Definition: symbol.h:712
Definition: runtime-type-info.h:51
Definition: runtime-type-info.h:30