[libcxx-commits] [PATCH] D143443: [libc++] Use __builtin_FILE and __builtin_LINE in _LIBCPP_ASSERT
    Louis Dionne via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Mon Feb  6 20:10:02 PST 2023
    
    
  
ldionne updated this revision to Diff 495363.
ldionne added a comment.
Rebase onto main
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143443/new/
https://reviews.llvm.org/D143443
Files:
  libcxx/include/__assert
Index: libcxx/include/__assert
===================================================================
--- libcxx/include/__assert
+++ libcxx/include/__assert
@@ -41,7 +41,7 @@
 # define _LIBCPP_ASSERT(expression, message)                                        \
     (__builtin_expect(static_cast<bool>(expression), 1) ?                           \
       (void)0 :                                                                     \
-      _LIBCPP_VERBOSE_ABORT("%s:%d: assertion %s failed: %s", __FILE__, __LINE__, #expression, message))
+      _LIBCPP_VERBOSE_ABORT("%s:%d: assertion %s failed: %s", __builtin_FILE(), __builtin_LINE(), #expression, message))
 #elif !defined(_LIBCPP_ASSERTIONS_DISABLE_ASSUME) && __has_builtin(__builtin_assume)
 # define _LIBCPP_ASSERT(expression, message)                                        \
     (_LIBCPP_DIAGNOSTIC_PUSH                                                        \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143443.495363.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230207/bbf16207/attachment.bin>
    
    
More information about the libcxx-commits
mailing list