Add implicit definition of objc_msgSend.

- As with malloc and friends, this is important where the return type
   on a 64-bit platform would otherwise end up discarding the upper
   32-bits.

llvm-svn: 69874
This commit is contained in:
Daniel Dunbar 2009-04-23 07:00:09 +00:00
parent 7b0344f656
commit 4645707034
2 changed files with 12 additions and 0 deletions

View File

@ -249,6 +249,11 @@ LIBBUILTIN(vfprintf, "iP*cC*a", "fP:1:", "stdio.h")
LIBBUILTIN(vsnprintf, "ic*zcC*a", "fP:2:", "stdio.h")
LIBBUILTIN(vsprintf, "ic*cC*a", "fP:1:", "stdio.h")
// FIXME: This type isn't very correct, it should be
// id objc_msgSend(id, SEL)
// but we need new type letters for that.
LIBBUILTIN(objc_msgSend, "v*.", "f", "objc/message.h")
// FIXME: asprintf and vasprintf aren't C99 functions. Should they be
// target-specific builtins, perhaps?

View File

@ -0,0 +1,7 @@
// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-llvm -o %t %s &&
// RUN: grep -F 'declare i8* @objc_msgSend(...)' %t
typedef struct objc_selector *SEL;
id f0(id x, SEL s) {
return objc_msgSend(x, s);
}