[flang-commits] [flang] 38b54c7 - [flang] fix shared library builds after #81166
Jean Perier via flang-commits
flang-commits at lists.llvm.org
Fri Feb 9 00:57:01 PST 2024
Author: Jean Perier
Date: 2024-02-09T00:50:48-08:00
New Revision: 38b54c72ca83fd56830b13d2a8d7749887b77922
URL: https://github.com/llvm/llvm-project/commit/38b54c72ca83fd56830b13d2a8d7749887b77922
DIFF: https://github.com/llvm/llvm-project/commit/38b54c72ca83fd56830b13d2a8d7749887b77922.diff
LOG: [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.
Added:
Modified:
flang/lib/Evaluate/characteristics.cpp
Removed:
################################################################################
diff --git a/flang/lib/Evaluate/characteristics.cpp b/flang/lib/Evaluate/characteristics.cpp
index c14a422ad038f0..80b0f346c32d38 100644
--- a/flang/lib/Evaluate/characteristics.cpp
+++ b/flang/lib/Evaluate/characteristics.cpp
@@ -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)
More information about the flang-commits
mailing list