mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 08:30:34 +08:00
[flang] fix shared library builds after #81166
Fix https://lab.llvm.org/buildbot/#/builders/268/builds/7826 IsDerivedTypeWithLengthParameter cannot be used here, it would make libFortranEvaluate dependent on linFortranSemantics. Replace by loop through parameter values.
This commit is contained in:
@@ -474,9 +474,13 @@ bool DummyDataObject::IsPassedByDescriptor(bool isBindC) const {
|
||||
// Need to pass dynamic type info in a descriptor.
|
||||
return true;
|
||||
} else if (const auto *derived{GetDerivedTypeSpec(type.type())}) {
|
||||
if (const semantics::Scope *scope = derived->scope()) {
|
||||
// Need to pass length type parameters in a descriptor if any.
|
||||
return scope->IsDerivedTypeWithLengthParameter();
|
||||
if (!derived->parameters().empty()) {
|
||||
for (const auto ¶m : derived->parameters()) {
|
||||
if (param.second.isLen()) {
|
||||
// Need to pass length type parameters in a descriptor.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (isBindC && type.type().IsAssumedLengthCharacter()) {
|
||||
// Fortran 2018 18.3.6 point 2 (5)
|
||||
|
||||
Reference in New Issue
Block a user