[flang-commits] [flang] [flang] Fix CFI_CDESC_T for C++ interoperability (PR #67568)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Mon Oct 16 10:21:11 PDT 2023


https://github.com/klausler updated https://github.com/llvm/llvm-project/pull/67568

>From c006a27a6fcb82c108ab61d499976f0e2cc9d2d4 Mon Sep 17 00:00:00 2001
From: Peter Klausler <pklausler at nvidia.com>
Date: Wed, 27 Sep 2023 08:18:05 -0700
Subject: [PATCH] [flang] Fix CFI_CDESC_T for C++ interoperability

Full namespace qualification is needed on an identifier.
---
 flang/include/flang/ISO_Fortran_binding.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/flang/include/flang/ISO_Fortran_binding.h b/flang/include/flang/ISO_Fortran_binding.h
index 2893fd46c267d9b..51d6219427cce5e 100644
--- a/flang/include/flang/ISO_Fortran_binding.h
+++ b/flang/include/flang/ISO_Fortran_binding.h
@@ -169,7 +169,7 @@ template <int r> struct CdescStorage : public CFI_cdesc_t {
 template <> struct CdescStorage<1> : public CFI_cdesc_t {};
 template <> struct CdescStorage<0> : public CFI_cdesc_t {};
 } // namespace cfi_internal
-#define CFI_CDESC_T(rank) cfi_internal::CdescStorage<rank>
+#define CFI_CDESC_T(rank) ::Fortran::ISO::cfi_internal::CdescStorage<rank>
 #else
 #define CFI_CDESC_T(_RANK) \
   struct { \
@@ -200,8 +200,8 @@ RT_API_ATTRS int CFI_setpointer(
 #ifdef __cplusplus
 } // extern "C"
 } // inline namespace Fortran_2018
-}
-}
+} // namespace ISO
+} // namespace Fortran
 #endif
 
 #endif /* CFI_ISO_FORTRAN_BINDING_H_ */



More information about the flang-commits mailing list