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

via flang-commits flang-commits at lists.llvm.org
Mon Oct 16 16:26:09 PDT 2023


Author: Peter Klausler
Date: 2023-10-16T16:26:06-07:00
New Revision: d343529d0bd035c515fc6aa5bad5750f262b3345

URL: https://github.com/llvm/llvm-project/commit/d343529d0bd035c515fc6aa5bad5750f262b3345
DIFF: https://github.com/llvm/llvm-project/commit/d343529d0bd035c515fc6aa5bad5750f262b3345.diff

LOG: [flang] Fix CFI_CDESC_T for C++ interoperability (#67568)

Full namespace qualification is needed on an identifier.

Added: 
    

Modified: 
    flang/include/flang/ISO_Fortran_binding.h

Removed: 
    


################################################################################
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