diff options
author | John McCall <rjmccall@apple.com> | 2013-04-11 02:14:26 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-04-11 02:14:26 +0000 |
commit | 93b64571e92c10bb168c2a2786c1380f334ba960 (patch) | |
tree | 51d903e13f661e4b76f664532c1a841b6199a78c /test/CodeGenObjCXX | |
parent | 411d33aa0b0d3bc9b2faec40cd821bdd836094ab (diff) | |
download | clang-93b64571e92c10bb168c2a2786c1380f334ba960.tar.gz |
Drop ObjCIndirectCopyRestoreExprs during template instantiation.
It's a kind of implicit conversion, which we generally drop, but
more importantly it's got very specific placement requirements.
rdar://13617051
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjCXX')
-rw-r--r-- | test/CodeGenObjCXX/arc.mm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/arc.mm b/test/CodeGenObjCXX/arc.mm index 1888dbe77d..e3e86a0b0d 100644 --- a/test/CodeGenObjCXX/arc.mm +++ b/test/CodeGenObjCXX/arc.mm @@ -275,3 +275,25 @@ id Test39::bar() { return 0; } // CHECK: define i8* @_ZThn8_N6Test393barEv( // CHECK: call i8* @_ZN6Test393barEv( // CHECK-NEXT: ret i8* + +// rdar://13617051 +// Just a basic sanity-check that IR-gen still works after instantiating +// a non-dependent message send that requires writeback. +@interface Test40 ++ (void) foo:(id *)errorPtr; +@end +template <class T> void test40_helper() { + id x; + [Test40 foo: &x]; +}; +template void test40_helper<int>(); +// CHECK: define weak_odr void @_Z13test40_helperIiEvv() +// CHECK: [[X:%.*]] = alloca i8* +// CHECK-NEXT: [[TEMP:%.*]] = alloca i8* +// CHECK-NEXT: store i8* null, i8** [[X]] +// CHECK: [[T0:%.*]] = load i8** [[X]] +// CHECK-NEXT: store i8* [[T0]], i8** [[TEMP]] +// CHECK: @objc_msgSend +// CHECK-NEXT: [[T0:%.*]] = load i8** [[TEMP]] +// CHECK-NEXT: call i8* @objc_retain(i8* [[T0]]) + |