summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjCXX/arc-blocks.mm
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-07-18 15:52:10 +0000
committerHal Finkel <hfinkel@anl.gov>2014-07-18 15:52:10 +0000
commit4cdf252c1243bc19662ca522657a583b060df913 (patch)
tree0e28d43e32d8a30012a4ca53cb503e3b40128365 /test/CodeGenObjCXX/arc-blocks.mm
parentd100f97758f2a65e6ffdaaa7154753f5f15d09e6 (diff)
Mark C++ reference parameters as dereferenceable
Because references must be initialized using some evaluated expression, they must point to something, and a callee can assume the reference parameter is dereferenceable. Taking advantage of a new attribute just added to LLVM, mark them as such. Because dereferenceability in addrspace(0) implies nonnull in the backend, we don't need both attributes. However, we need to know the size of the object to use the dereferenceable attribute, so for incomplete types we still emit only nonnull. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjCXX/arc-blocks.mm')
-rw-r--r--test/CodeGenObjCXX/arc-blocks.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGenObjCXX/arc-blocks.mm b/test/CodeGenObjCXX/arc-blocks.mm
index 4fc3885c3d..2695b4dbbd 100644
--- a/test/CodeGenObjCXX/arc-blocks.mm
+++ b/test/CodeGenObjCXX/arc-blocks.mm
@@ -38,7 +38,7 @@ namespace test0 {
// CHECK-NEXT: load
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* {{.*}} to [[BYREF_A]]*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_A]]* [[T2]], i32 0, i32 7
- // CHECK-NEXT: call void @_ZN5test01AC1ERKS0_([[A]]* [[T1]], [[A]]* nonnull [[T3]])
+ // CHECK-NEXT: call void @_ZN5test01AC1ERKS0_([[A]]* [[T1]], [[A]]* dereferenceable({{[0-9]+}}) [[T3]])
// CHECK-NEXT: ret void
// CHECK: define internal void [[DISPOSE_HELPER]](