r287602 - Fix -Asserts build, and add some more test cases.
Peter Collingbourne via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 21 16:43:30 PST 2016
Author: pcc
Date: Mon Nov 21 18:43:30 2016
New Revision: 287602
URL: http://llvm.org/viewvc/llvm-project?rev=287602&view=rev
Log:
Fix -Asserts build, and add some more test cases.
Modified:
cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp
Modified: cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp?rev=287602&r1=287601&r2=287602&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp Mon Nov 21 18:43:30 2016
@@ -212,10 +212,7 @@ struct A {
void *p;
};
void *foo(A a) { return a.p; }
-// WIN64-LABEL: define i8* @"\01?foo at definition_only@@YAPEAXUA at 1@@Z"{{.*}}
-// WIN64-NEXT: :
-// WIN64-NEXT: getelementptr
-// WIN64-NEXT: load
+// WIN64-LABEL: define i8* @"\01?foo at definition_only@@YAPEAXUA at 1@@Z"(%"struct.definition_only::A"*
}
namespace deleted_by_member {
@@ -229,11 +226,7 @@ struct A {
B b;
};
void *foo(A a) { return a.b.p; }
-// WIN64-LABEL: define i8* @"\01?foo at deleted_by_member@@YAPEAXUA at 1@@Z"{{.*}}
-// WIN64-NEXT: :
-// WIN64-NEXT: getelementptr
-// WIN64-NEXT: getelementptr
-// WIN64-NEXT: load
+// WIN64-LABEL: define i8* @"\01?foo at deleted_by_member@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_member::A"*
}
namespace deleted_by_base {
@@ -246,11 +239,34 @@ struct A : B {
A();
};
void *foo(A a) { return a.p; }
-// WIN64-LABEL: define i8* @"\01?foo at deleted_by_base@@YAPEAXUA at 1@@Z"{{.*}}
-// WIN64-NEXT: :
-// WIN64-NEXT: bitcast
-// WIN64-NEXT: getelementptr
-// WIN64-NEXT: load
+// WIN64-LABEL: define i8* @"\01?foo at deleted_by_base@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_base::A"*
+}
+
+namespace deleted_by_member_copy {
+struct B {
+ B();
+ B(const B &o) = delete;
+ void *p;
+};
+struct A {
+ A();
+ B b;
+};
+void *foo(A a) { return a.b.p; }
+// WIN64-LABEL: define i8* @"\01?foo at deleted_by_member_copy@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_member_copy::A"*
+}
+
+namespace deleted_by_base_copy {
+struct B {
+ B();
+ B(const B &o) = delete;
+ void *p;
+};
+struct A : B {
+ A();
+};
+void *foo(A a) { return a.p; }
+// WIN64-LABEL: define i8* @"\01?foo at deleted_by_base_copy@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_base_copy::A"*
}
namespace explicit_delete {
@@ -259,9 +275,6 @@ struct A {
A(const A &o) = delete;
void *p;
};
-// WIN64-LABEL: define i8* @"\01?foo at explicit_delete@@YAPEAXUA at 1@@Z"{{.*}}
-// WIN64-NEXT: :
-// WIN64-NEXT: getelementptr
-// WIN64-NEXT: load
+// WIN64-LABEL: define i8* @"\01?foo at explicit_delete@@YAPEAXUA at 1@@Z"(%"struct.explicit_delete::A"*
void *foo(A a) { return a.p; }
}
More information about the cfe-commits
mailing list