diff options
author | John McCall <rjmccall@apple.com> | 2011-09-13 23:05:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-09-13 23:05:03 +0000 |
commit | a45680b7e7c49ea9893c6cff585984f3e4120366 (patch) | |
tree | 0f2ea940c7aabddba908ed89e0d9f77510d9769a /test/CodeGenObjC/builtins.m | |
parent | 36f37b6f578249c20d7a3b3aa77f0a00069ca9ac (diff) | |
download | clang-a45680b7e7c49ea9893c6cff585984f3e4120366.tar.gz |
Correctly generate IR for casted "builtin" functions, where
the builtin is really just a predefined declaration. These are
totally valid to cast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139657 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjC/builtins.m')
-rw-r--r-- | test/CodeGenObjC/builtins.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGenObjC/builtins.m b/test/CodeGenObjC/builtins.m new file mode 100644 index 0000000000..022ac1db33 --- /dev/null +++ b/test/CodeGenObjC/builtins.m @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s + +void test0(id receiver, SEL sel, const char *str) { + short s = ((short (*)(id, SEL, const char*)) objc_msgSend)(receiver, sel, str); +} +// CHECK: define void @test0( +// CHECK: call signext i16 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i16 (i8*, i8*, i8*)*)( |