[libc-commits] [libc] [libc][stdfix] Implement `idivfx` functions in LLVM libc (PR #133005)
via libc-commits
libc-commits at lists.llvm.org
Fri Apr 18 16:07:18 PDT 2025
================
@@ -19,10 +19,19 @@
if (LIBC_UNLIKELY((ptr) == nullptr)) \
__builtin_trap(); \
} while (0)
+#define LIBC_CRASH_ON_VALUE(var, value) \
+ do { \
+ if (LIBC_UNLIKELY((var) == (value))) \
+ __builtin_trap(); \
+ } while (0)
+
----------------
lntue wrote:
This is an option for hardening against UB, and it needs a different macro from `LIBC_ASSERT` because assertions will be omitted for non-debug build.
https://github.com/llvm/llvm-project/pull/133005
More information about the libc-commits
mailing list