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

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Fri Sep 29 14:19:13 PDT 2023


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

>From 8d51aaf470bbea7a3ff20af7d832cff323ff0796 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 59e31462ab5aac7..63b6c2dfb64c03c 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 { \
@@ -199,8 +199,8 @@ 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