[flang-commits] [flang] ded52a4 - [flang] Make CollectBindings available to lowering
Valentin Clement via flang-commits
flang-commits at lists.llvm.org
Thu Nov 17 01:46:21 PST 2022
Author: Valentin Clement
Date: 2022-11-17T10:46:15+01:00
New Revision: ded52a44d0d75210fa87dc42607fadcf1ac8b67d
URL: https://github.com/llvm/llvm-project/commit/ded52a44d0d75210fa87dc42607fadcf1ac8b67d
DIFF: https://github.com/llvm/llvm-project/commit/ded52a44d0d75210fa87dc42607fadcf1ac8b67d.diff
LOG: [flang] Make CollectBindings available to lowering
Reviewed By: jeanPerier, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D138129
Added:
Modified:
flang/include/flang/Semantics/runtime-type-info.h
flang/lib/Semantics/runtime-type-info.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Semantics/runtime-type-info.h b/flang/include/flang/Semantics/runtime-type-info.h
index fad41d63e2da4..4bb93c8e5069b 100644
--- a/flang/include/flang/Semantics/runtime-type-info.h
+++ b/flang/include/flang/Semantics/runtime-type-info.h
@@ -16,6 +16,7 @@
#include <set>
#include <string>
+#include <vector>
namespace llvm {
class raw_ostream;
@@ -37,5 +38,7 @@ RuntimeDerivedTypeTables BuildRuntimeDerivedTypeTables(SemanticsContext &);
/// to describe other derived types at runtime in flang descriptor.
constexpr char typeInfoBuiltinModule[]{"__fortran_type_info"};
+std::vector<const Symbol *> CollectBindings(const Scope &dtScope);
+
} // namespace Fortran::semantics
#endif // FORTRAN_SEMANTICS_RUNTIME_TYPE_INFO_H_
diff --git a/flang/lib/Semantics/runtime-type-info.cpp b/flang/lib/Semantics/runtime-type-info.cpp
index ace2c8a6bb07e..a3877e776bdc8 100644
--- a/flang/lib/Semantics/runtime-type-info.cpp
+++ b/flang/lib/Semantics/runtime-type-info.cpp
@@ -65,7 +65,6 @@ class RuntimeTableBuilder {
evaluate::StructureConstructor PackageIntValue(
const SomeExpr &genre, std::int64_t = 0) const;
SomeExpr PackageIntValueExpr(const SomeExpr &genre, std::int64_t = 0) const;
- std::vector<const Symbol *> CollectBindings(const Scope &dtScope) const;
std::vector<evaluate::StructureConstructor> DescribeBindings(
const Scope &dtScope, Scope &);
void DescribeGeneric(
@@ -941,8 +940,7 @@ SomeExpr RuntimeTableBuilder::PackageIntValueExpr(
return StructureExpr(PackageIntValue(genre, n));
}
-std::vector<const Symbol *> RuntimeTableBuilder::CollectBindings(
- const Scope &dtScope) const {
+std::vector<const Symbol *> CollectBindings(const Scope &dtScope) {
std::vector<const Symbol *> result;
std::map<SourceName, const Symbol *> localBindings;
// Collect local bindings
@@ -1148,4 +1146,5 @@ RuntimeDerivedTypeTables BuildRuntimeDerivedTypeTables(
}
return result;
}
+
} // namespace Fortran::semantics
More information about the flang-commits
mailing list