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

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Wed Sep 27 08:19:54 PDT 2023


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

Full namespace qualification is needed on an identifier.

>From 22a0ec0ca3dec8086e8a16de069858e9a963541f 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