Skip to content

Commit f43fbad

Browse files
authored
Merge pull request #10453 from Steelskin/fabrice/cp-fix-build-without-asserts
🍒 [lldb] Fix building with GCC without asserts (llvm/llvm-project@fcead25)
2 parents f03db28 + 800a20a commit f43fbad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lldb/include/lldb/Utility/LLDBAssert.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@
2727
} while (0)
2828
#else
2929
#define lldbassert(x) \
30-
lldb_private::_lldb_assert(static_cast<bool>(x), #x, __FUNCTION__, __FILE__, \
31-
__LINE__)
30+
do { \
31+
static std::once_flag _once_flag; \
32+
lldb_private::_lldb_assert(static_cast<bool>(x), #x, __FUNCTION__, \
33+
__FILE__, __LINE__, _once_flag); \
34+
} while (0)
3235
#endif
3336
#endif
3437

0 commit comments

Comments
 (0)