Place the definition of 'va_list' within a preprocessor guard. This matches the behavior of GCC, and avoids potential conflicts with system headers (e.g., stdio.h). Fixes <rdar://problem/7727145>.

llvm-svn: 98003
This commit is contained in:
Ted Kremenek 2010-03-08 23:13:05 +00:00
parent 449a9ff14b
commit 4c9862ca1d
1 changed files with 3 additions and 0 deletions

View File

@ -26,7 +26,10 @@
#ifndef __STDARG_H
#define __STDARG_H
#ifndef _VA_LIST
typedef __builtin_va_list va_list;
#define _VA_LIST
#endif
#define va_start(ap, param) __builtin_va_start(ap, param)
#define va_end(ap) __builtin_va_end(ap)
#define va_arg(ap, type) __builtin_va_arg(ap, type)