From fcead25550bb727215919ecf2dfad17765223c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 5 Apr 2025 16:53:05 +0300 Subject: [PATCH] [lldb] Fix building with GCC without asserts This case was missed in 03604a784011bec2292f900b118d825f34f8cf89. --- lldb/include/lldb/Utility/LLDBAssert.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lldb/include/lldb/Utility/LLDBAssert.h b/lldb/include/lldb/Utility/LLDBAssert.h index cc0146be2599..e76dac46b94f 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(x), #x, __FUNCTION__, __FILE__, \ - __LINE__) + do { \ + static std::once_flag _once_flag; \ + lldb_private::_lldb_assert(static_cast(x), #x, __FUNCTION__, \ + __FILE__, __LINE__, _once_flag); \ + } while (0) #endif #endif