Author: Martin Storsjö Date: 2025-04-05T16:55:36+03:00 New Revision: fcead25550bb727215919ecf2dfad17765223c19
URL: https://github.com/llvm/llvm-project/commit/fcead25550bb727215919ecf2dfad17765223c19 DIFF: https://github.com/llvm/llvm-project/commit/fcead25550bb727215919ecf2dfad17765223c19.diff LOG: [lldb] Fix building with GCC without asserts This case was missed in 03604a784011bec2292f900b118d825f34f8cf89. Added: Modified: lldb/include/lldb/Utility/LLDBAssert.h Removed: ################################################################################ diff --git a/lldb/include/lldb/Utility/LLDBAssert.h b/lldb/include/lldb/Utility/LLDBAssert.h index cc0146be25998..e76dac46b94f4 100644 --- a/lldb/include/lldb/Utility/LLDBAssert.h +++ b/lldb/include/lldb/Utility/LLDBAssert.h @@ -27,8 +27,11 @@ } while (0) #else #define lldbassert(x) \ - lldb_private::_lldb_assert(static_cast<bool>(x), #x, __FUNCTION__, __FILE__, \ - __LINE__) + do { \ + static std::once_flag _once_flag; \ + lldb_private::_lldb_assert(static_cast<bool>(x), #x, __FUNCTION__, \ + __FILE__, __LINE__, _once_flag); \ + } while (0) #endif #endif _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits