From 273ee0f8a6abad77f32bc35c1c24ec574e5d4bb4 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 6 Feb 2014 19:14:16 +0000 Subject: [PATCH] Silence build-bots from the fallout of r200921 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200940 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/mangle-ms-templates-memptrs.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp b/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp index 21b92952d6..0d30b9efb4 100644 --- a/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp +++ b/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp @@ -5,12 +5,12 @@ static_assert(sizeof(void (U::*)()) == 2 * sizeof(void*) + 2 * sizeof(int), ""); 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(s); ReadField(s); ReadField(m); ReadField(v); ReadField(u); - ReadField(s); ReadField(s); ReadField(m); ReadField(v); @@ -46,15 +45,17 @@ void ReadFields() { // Non-polymorphic null data memptr vs first field memptr. ReadField(a); ReadField(a); + + // Indirect fields injected from anonymous unions and structs + ReadField(i); + ReadField(i); } // CHECK-LABEL: define {{.*}}ReadFields -// CHECK: call {{.*}} @"\01??$ReadField@UI@@$03@@YAHAAUS@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@US@@$03@@YAHAAUS@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@UM@@$0M@@@YAHAAUM@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@UV@@$F7A@@@YAHAAUV@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@UU@@$G3A@A@@@YAHAAUU@@@Z" -// CHECK: call {{.*}} @"\01??$ReadField@UI@@$07@@YAHAAUS@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@US@@$07@@YAHAAUS@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@UM@@$0BA@@@YAHAAUM@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@UV@@$FM@A@@@YAHAAUV@@@Z" @@ -72,6 +73,11 @@ void ReadFields() { // CHECK: call {{.*}} @"\01??$ReadField@UA@@$0A@@@YAHAAUA@@@Z" // CHECK: call {{.*}} @"\01??$ReadField@UA@@$0?0@@YAHAAUA@@@Z" +// Indirect fields are handled as-if they were simply members of their enclosing +// record. +// CHECK: call {{.*}} @"\01??$ReadField@UI@@$0A@@@YAHAAUI@@@Z" +// CHECK: call {{.*}} @"\01??$ReadField@UI@@$03@@YAHAAUI@@@Z" + // Test member function pointers. template void CallMethod(T &o) { -- 2.40.0