[libc-commits] [libc] [libc] assert.h modifications for newhdrgen (PR #98092)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Fri Jul 12 10:34:17 PDT 2024


================
@@ -9,42 +9,6 @@ include "spec/stdc_ext.td"
 include "spec/llvm_libc_ext.td"
 include "spec/llvm_libc_stdfix_ext.td"
 
-def AssertMacro : MacroDef<"assert"> {
-  let Defn = [{
-    #undef assert
-
-    #ifdef NDEBUG
-    #define assert(e) (void)0
-    #else
-
-    #ifdef __cplusplus
-    extern "C"
-    #endif
-    _Noreturn void __assert_fail(const char *, const char *, unsigned, const char *) __NOEXCEPT;
-
-    #define assert(e)  \
-      ((e) ? (void)0 : __assert_fail(#e, __FILE__, __LINE__, __PRETTY_FUNCTION__))
-
-    #endif
-  }];
-}
-
-def StaticAssertMacro : MacroDef<"static_assert"> {
-  let Defn = [{
-    #ifndef __cplusplus
----------------
michaelrj-google wrote:

this macro also needs to be added to the .h.def

https://github.com/llvm/llvm-project/pull/98092


More information about the libc-commits mailing list