zatrazz updated this revision to Diff 474028. zatrazz marked 2 inline comments as done. zatrazz added a comment.
Update review based on reviewers comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137268/new/ https://reviews.llvm.org/D137268 Files: clang/lib/Headers/stdarg.h compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp Index: compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp =================================================================== --- compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp +++ compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp @@ -5,6 +5,7 @@ #include <assert.h> #include <signal.h> +#include <stdarg.h> #include <stdio.h> #include <sys/time.h> #include <sys/wait.h> Index: clang/lib/Headers/stdarg.h =================================================================== --- clang/lib/Headers/stdarg.h +++ clang/lib/Headers/stdarg.h @@ -8,8 +8,16 @@ */ #ifndef __STDARG_H -#define __STDARG_H +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif + +#ifdef __need___va_list +#undef __need___va_list +#else +#define __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; #define _VA_LIST @@ -29,9 +37,6 @@ #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST 1 -typedef __builtin_va_list __gnuc_va_list; -#endif - #endif /* __STDARG_H */ + +#endif /* not __STDARG_H */
Index: compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp =================================================================== --- compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp +++ compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp @@ -5,6 +5,7 @@ #include <assert.h> #include <signal.h> +#include <stdarg.h> #include <stdio.h> #include <sys/time.h> #include <sys/wait.h> Index: clang/lib/Headers/stdarg.h =================================================================== --- clang/lib/Headers/stdarg.h +++ clang/lib/Headers/stdarg.h @@ -8,8 +8,16 @@ */ #ifndef __STDARG_H -#define __STDARG_H +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif + +#ifdef __need___va_list +#undef __need___va_list +#else +#define __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; #define _VA_LIST @@ -29,9 +37,6 @@ #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST 1 -typedef __builtin_va_list __gnuc_va_list; -#endif - #endif /* __STDARG_H */ + +#endif /* not __STDARG_H */
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits