aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Semantics/tools.cpp')
-rw-r--r--flang/lib/Semantics/tools.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/flang/lib/Semantics/tools.cpp b/flang/lib/Semantics/tools.cpp
index 256a5cc1d317..68db3e186a99 100644
--- a/flang/lib/Semantics/tools.cpp
+++ b/flang/lib/Semantics/tools.cpp
@@ -1053,10 +1053,9 @@ SymbolVector OrderParameterDeclarations(const Symbol &typeSymbol) {
return result;
}
-const DeclTypeSpec &FindOrInstantiateDerivedType(Scope &scope,
- DerivedTypeSpec &&spec, SemanticsContext &semanticsContext,
- DeclTypeSpec::Category category) {
- spec.EvaluateParameters(semanticsContext);
+const DeclTypeSpec &FindOrInstantiateDerivedType(
+ Scope &scope, DerivedTypeSpec &&spec, DeclTypeSpec::Category category) {
+ spec.EvaluateParameters(scope.context());
if (const DeclTypeSpec *
type{scope.FindInstantiatedDerivedType(spec, category)}) {
return *type;
@@ -1064,7 +1063,7 @@ const DeclTypeSpec &FindOrInstantiateDerivedType(Scope &scope,
// Create a new instantiation of this parameterized derived type
// for this particular distinct set of actual parameter values.
DeclTypeSpec &type{scope.MakeDerivedType(category, std::move(spec))};
- type.derivedTypeSpec().Instantiate(scope, semanticsContext);
+ type.derivedTypeSpec().Instantiate(scope);
return type;
}