forked from OSchip/llvm-project
Expression evaluation for functions with unknown signatures on works by
inferring the function signature. This works well where the ABI doesn't distinguish between variadic and fixed argument lists, but on arm64 the calling conventions differ. The default assumption works for fixed argument lists, but variadic functions require explicit prototypes to be called. By far the most common case where this is an issue is when attempting to use printf(). This change augments the default expression prefix to include a working variadic prototype for the function. <rdar://problem/19024779> llvm-svn: 226744
This commit is contained in:
parent
701d2dd4b7
commit
cc391a0a12
|
@ -41,6 +41,10 @@ typedef __UINTPTR_TYPE__ uintptr_t;
|
|||
typedef __SIZE_TYPE__ size_t;
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
typedef unsigned short unichar;
|
||||
extern "C"
|
||||
{
|
||||
int printf(const char * __restrict, ...);
|
||||
}
|
||||
)";
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue