summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/rvalue-references.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-05-28 09:56:42 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-05-28 09:56:42 +0000
commit9b46eb81127be4a7560952677294d3c376648c08 (patch)
tree99e4aa165636c60d4f0e903a00b1f41e7976a6ae /clang/test/CodeGenCXX/rvalue-references.cpp
parenta09b70579a8cbddbd677250916e82cf43932bd99 (diff)
downloadbcm5719-llvm-9b46eb81127be4a7560952677294d3c376648c08.tar.gz
bcm5719-llvm-9b46eb81127be4a7560952677294d3c376648c08.zip
Add 'nonnull' parameter or return attribute when producing an llvm pointer type in a function type where the C++ type is a reference. Update the tests.
llvm-svn: 209723
Diffstat (limited to 'clang/test/CodeGenCXX/rvalue-references.cpp')
-rw-r--r--clang/test/CodeGenCXX/rvalue-references.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/CodeGenCXX/rvalue-references.cpp b/clang/test/CodeGenCXX/rvalue-references.cpp
index 2e0fa829ec9..6c723b8b825 100644
--- a/clang/test/CodeGenCXX/rvalue-references.cpp
+++ b/clang/test/CodeGenCXX/rvalue-references.cpp
@@ -7,8 +7,8 @@ struct B : Spacer, A { };
B &getB();
-// CHECK-LABEL: define %struct.A* @_Z4getAv()
-// CHECK: call %struct.B* @_Z4getBv()
+// CHECK-LABEL: define nonnull %struct.A* @_Z4getAv()
+// CHECK: call nonnull %struct.B* @_Z4getBv()
// CHECK-NEXT: bitcast %struct.B*
// CHECK-NEXT: getelementptr inbounds i8*
// CHECK-NEXT: bitcast i8* {{.*}} to %struct.A*
@@ -19,17 +19,17 @@ int &getIntLValue();
int &&getIntXValue();
int getIntPRValue();
-// CHECK-LABEL: define i32* @_Z2f0v()
-// CHECK: call i32* @_Z12getIntLValuev()
+// CHECK-LABEL: define nonnull i32* @_Z2f0v()
+// CHECK: call nonnull i32* @_Z12getIntLValuev()
// CHECK-NEXT: ret i32*
int &&f0() { return static_cast<int&&>(getIntLValue()); }
-// CHECK-LABEL: define i32* @_Z2f1v()
-// CHECK: call i32* @_Z12getIntXValuev()
+// CHECK-LABEL: define nonnull i32* @_Z2f1v()
+// CHECK: call nonnull i32* @_Z12getIntXValuev()
// CHECK-NEXT: ret i32*
int &&f1() { return static_cast<int&&>(getIntXValue()); }
-// CHECK-LABEL: define i32* @_Z2f2v
+// CHECK-LABEL: define nonnull i32* @_Z2f2v
// CHECK: call i32 @_Z13getIntPRValuev()
// CHECK-NEXT: store i32 {{.*}}, i32*
// CHECK-NEXT: ret i32*
@@ -95,7 +95,7 @@ namespace test1 {
};
// CHECK-LABEL: define void @_ZN5test11BC2Ei(
- // CHECK: [[T0:%.*]] = call i32* @_ZN5test14moveERi(
+ // CHECK: [[T0:%.*]] = call nonnull i32* @_ZN5test14moveERi(
// CHECK-NEXT: [[T1:%.*]] = load i32* [[T0]]
// CHECK-NEXT: call void @_ZN5test11AC1Ei({{.*}}, i32 [[T1]])
// CHECK-NEXT: ret void
OpenPOWER on IntegriCloud