[all-commits] [llvm/llvm-project] 8dfd88: [flang] Add ClassIs runtime function
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Fri Nov 18 12:17:31 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8dfd883531bf27163aa429daeb9691219875db1c
https://github.com/llvm/llvm-project/commit/8dfd883531bf27163aa429daeb9691219875db1c
Author: Valentin Clement <clementval at gmail.com>
Date: 2022-11-18 (Fri, 18 Nov 2022)
Changed paths:
M flang/include/flang/Runtime/derived-api.h
M flang/runtime/derived-api.cpp
Log Message:
-----------
[flang] Add ClassIs runtime function
Add a `ClassIs` function that takes a descriptor and a
type desc to implement the check needed by the CLASS IS type guard
in SELECT TYPE construct.
Since the kind type parameter are directly folded in the type itself
in Flang and the type descriptor is a global, the function just check
if the type descriptor address of the descriptor is equivalent to
the type descriptor address of the global. If not, it check in the
parents of the descriptor's type descriptor.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D138279
More information about the All-commits
mailing list