[PATCH] D102936: [CUDA] Work around compatibility issue with libstdc++ 11.1.0

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 21 12:01:08 PDT 2021


tra updated this revision to Diff 347092.
tra edited the summary of this revision.
tra added a comment.

Fixed typo in push/pop macro name.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102936/new/

https://reviews.llvm.org/D102936

Files:
  clang/lib/Headers/cuda_wrappers/complex


Index: clang/lib/Headers/cuda_wrappers/complex
===================================================================
--- clang/lib/Headers/cuda_wrappers/complex
+++ clang/lib/Headers/cuda_wrappers/complex
@@ -72,8 +72,16 @@
 #define _GLIBCXX_USE_C99_COMPLEX 0
 #define _GLIBCXX_USE_C99_COMPLEX_TR1 0
 
+// Work around a compatibility issue with libstdc++ 11.1.0
+// https://bugs.llvm.org/show_bug.cgi?id=50383
+#pragma push_macro("__failed_assertion")
+#if _GLIBCXX_RELEASE == 11 && __GLIBCXX__ == 20210427
+#define __failed_assertion __cuda_failed_assertion
+#endif
+
 #include_next <complex>
 
+#pragma pop_macro("__failed_assertion")
 #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX_TR1")
 #pragma pop_macro("_GLIBCXX_USE_C99_COMPLEX")
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102936.347092.patch
Type: text/x-patch
Size: 735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210521/7c54abb0/attachment.bin>


More information about the cfe-commits mailing list