r200940 - Silence build-bots from the fallout of r200921
David Majnemer
david.majnemer at gmail.com
Thu Feb 6 11:14:16 PST 2014
Author: majnemer
Date: Thu Feb 6 13:14:16 2014
New Revision: 200940
URL: http://llvm.org/viewvc/llvm-project?rev=200940&view=rev
Log:
Silence build-bots from the fallout of r200921
Modified:
cfe/trunk/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp
Modified: cfe/trunk/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp?rev=200940&r1=200939&r2=200940&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp Thu Feb 6 13:14:16 2014
@@ -5,12 +5,12 @@ static_assert(sizeof(void (U::*)()) == 2
struct A { int a; };
struct B { int b; };
+struct I { union { struct { int a, b; }; }; };
struct S { int a, b; void f(); virtual void g(); };
struct M : A, B { int a, b; void f(); virtual void g(); };
struct V : virtual A { int a, b; void f(); virtual void g(); };
struct U { int a, b; void f(); virtual void g(); };
-struct I { union { struct { int a, b; }; }; void f(); virtual void g(); };
struct C { virtual void f(); };
struct D { virtual void g(); };
@@ -24,16 +24,15 @@ int ReadField(T &o) {
void ReadFields() {
A a;
+ I i;
S s;
M m;
V v;
U u;
- ReadField<I, &S::a>(s);
ReadField<S, &S::a>(s);
ReadField<M, &M::a>(m);
ReadField<V, &V::a>(v);
ReadField<U, &U::a>(u);
- ReadField<I, &S::b>(s);
ReadField<S, &S::b>(s);
ReadField<M, &M::b>(m);
ReadField<V, &V::b>(v);
@@ -46,15 +45,17 @@ void ReadFields() {
// Non-polymorphic null data memptr vs first field memptr.
ReadField<A, &A::a>(a);
ReadField<A, nullptr>(a);
+
+ // Indirect fields injected from anonymous unions and structs
+ ReadField<I, &I::a>(i);
+ ReadField<I, &I::b>(i);
}
// CHECK-LABEL: define {{.*}}ReadFields
-// CHECK: call {{.*}} @"\01??$ReadField at UI@@$03@@YAHAAUS@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at US@@$03@@YAHAAUS@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at UM@@$0M@@@YAHAAUM@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at UV@@$F7A@@@YAHAAUV@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at UU@@$G3A at A@@@YAHAAUU@@@Z"
-// CHECK: call {{.*}} @"\01??$ReadField at UI@@$07@@YAHAAUS@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at US@@$07@@YAHAAUS@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at UM@@$0BA@@@YAHAAUM@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at UV@@$FM at A@@@YAHAAUV@@@Z"
@@ -72,6 +73,11 @@ void ReadFields() {
// CHECK: call {{.*}} @"\01??$ReadField at UA@@$0A@@@YAHAAUA@@@Z"
// CHECK: call {{.*}} @"\01??$ReadField at UA@@$0?0@@YAHAAUA@@@Z"
+// Indirect fields are handled as-if they were simply members of their enclosing
+// record.
+// CHECK: call {{.*}} @"\01??$ReadField at UI@@$0A@@@YAHAAUI@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField at UI@@$03@@YAHAAUI@@@Z"
+
// Test member function pointers.
template <typename T, void (T::*MFP)()>
void CallMethod(T &o) {
More information about the cfe-commits
mailing list