1 //===-- flang/runtime/non-tbp-dio.cpp ---------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #include "non-tbp-dio.h"
10 #include "type-info.h"
12 namespace Fortran::runtime::io
{
14 const NonTbpDefinedIo
*NonTbpDefinedIoTable::Find(
15 const typeInfo::DerivedType
&type
, common::DefinedIo definedIo
) const {
17 for (const auto *p
{item
}; j
-- > 0; ++p
) {
18 if (&p
->derivedType
== &type
&& p
->definedIo
== definedIo
) {
20 } else if (p
->isDtvArgPolymorphic
) {
21 for (const typeInfo::DerivedType
*t
{type
.GetParentType()}; t
;
22 t
= t
->GetParentType()) {
23 if (&p
->derivedType
== t
&& p
->definedIo
== definedIo
) {
32 } // namespace Fortran::runtime::io