[llvm] [flang][runtime] fix intrinsics case of extends_type_of (PR #161466)
Andre Kuhlenschmidt via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 08:50:53 PDT 2025
================
@@ -227,6 +227,7 @@ class Descriptor {
RT_API_ATTRS bool IsPointer() const {
return raw_.attribute == CFI_attribute_pointer;
}
+ RT_API_ATTRS bool IsAssociated() const { return raw_.base_addr != nullptr; }
----------------
akuhlens wrote:
Do you mean you would like me to use `IsAllocated`? It seems like I would have to know the underlying representation of the descriptor in order to know that was the right function to call. I can do that, but it adds complexity to the codebase in the form of the implicit knowledge that pointers and allocatable are both represented with the same check in `Descriptor`. I thought about renaming `IsAllocatedOrAssociated` but that would have been a much more pervasive change.
https://github.com/llvm/llvm-project/pull/161466
More information about the llvm-commits
mailing list