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 | 30e4efd4588231f9de0a331e60ea7c7bf9e71033 (patch) | |
| tree | ba875515a0308aa501908c3ddcc4456c05881a9f /clang/test/CodeGenObjC/builtins.m | |
| parent | 75461af000d156b89f7c6fd3fae9e536440b65cb (diff) | |
| download | bcm5719-llvm-30e4efd4588231f9de0a331e60ea7c7bf9e71033.tar.gz bcm5719-llvm-30e4efd4588231f9de0a331e60ea7c7bf9e71033.zip | |
Correctly generate IR for casted "builtin" functions, where
the builtin is really just a predefined declaration. These are
totally valid to cast.
llvm-svn: 139657
Diffstat (limited to 'clang/test/CodeGenObjC/builtins.m')
| -rw-r--r-- | clang/test/CodeGenObjC/builtins.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/builtins.m b/clang/test/CodeGenObjC/builtins.m new file mode 100644 index 00000000000..022ac1db339 --- /dev/null +++ b/clang/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*)*)( |

