[flang-commits] [PATCH] D158957: [flang][runtime] Avoid dependency on libc++ for `std::__libcpp_verbose_abort`
    Markus Mützel via Phabricator via flang-commits 
    flang-commits at lists.llvm.org
       
    Thu Oct 26 05:30:35 PDT 2023
    
    
  
This revision was automatically updated to reflect the committed changes.
Closed by commit rGce6b9b3b58b6: [flang][runtime] Avoid dependency on libc++ for `std::__libcpp_verbose_abort` (authored by mmuetzel).
Changed prior to commit:
  https://reviews.llvm.org/D158957?vs=553899&id=557893#toc
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158957/new/
https://reviews.llvm.org/D158957
Files:
  flang/runtime/io-api.cpp
Index: flang/runtime/io-api.cpp
===================================================================
--- flang/runtime/io-api.cpp
+++ flang/runtime/io-api.cpp
@@ -1517,3 +1517,17 @@
 #endif
 
 } // namespace Fortran::runtime::io
+
+#if defined(_LIBCPP_VERBOSE_ABORT)
+// Provide own definition for `std::__libcpp_verbose_abort` to avoid dependency
+// on the version provided by libc++.
+
+void std::__libcpp_verbose_abort(char const *format, ...) {
+  va_list list;
+  va_start(list, format);
+  std::vfprintf(stderr, format, list);
+  va_end(list);
+
+  std::abort();
+}
+#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158957.557893.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20231026/1789edf9/attachment.bin>
    
    
More information about the flang-commits
mailing list