r216791 - Fix my broken test cases.
Reid Kleckner
reid at kleckner.net
Fri Aug 29 15:06:21 PDT 2014
Author: rnk
Date: Fri Aug 29 17:06:20 2014
New Revision: 216791
URL: http://llvm.org/viewvc/llvm-project?rev=216791&view=rev
Log:
Fix my broken test cases.
Modified:
cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
cfe/trunk/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp?rev=216791&r1=216790&r2=216791&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp Fri Aug 29 17:06:20 2014
@@ -18,7 +18,6 @@ struct C {
virtual int bar(int, double);
virtual S baz(int);
virtual S qux(U);
- virtual S __fastcall zed(U);
};
namespace {
@@ -44,9 +43,6 @@ void f() {
S (C::*ptr5)(U);
ptr5 = &C::qux;
- S (__fastcall C::*ptr6)(U);
- ptr6 = &C::zed;
-
// CHECK32-LABEL: define void @"\01?f@@YAXXZ"()
// CHECK32: store i8* bitcast (void (%struct.C*, ...)* @"\01??_9C@@$BA at AE" to i8*), i8** %ptr
@@ -66,7 +62,7 @@ void f() {
// Thunk for calling the 1st virtual function in C with no parameters.
// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@@$BA at AE"(%struct.C* %this, ...)
-// CHECK32: unnamed_addr
+// CHECK32-NOT: unnamed_addr
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)** %{{.*}}, i64 0
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)** [[VPTR]]
// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
@@ -74,7 +70,7 @@ void f() {
// CHECK32: }
//
// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BA at AA"(%struct.C* %this, ...)
-// CHECK64: unnamed_addr
+// CHECK64-NOT: unnamed_addr
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)** %{{.*}}, i64 0
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)** [[VPTR]]
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
@@ -140,20 +136,4 @@ void f() {
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)** [[VPTR]]
// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
// CHECK64: ret void
-// CHECK64: }
-
-// Thunk for calling the fifth virtual function in C, taking a struct parameter
-// and returning a struct.
-// CHECK32-LABEL: define linkonce_odr x86_fastcallcc void @"\01??_9C@@$BBA at AE"(%struct.C* inreg %this, ...)
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)** %{{.*}}, i64 4
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_fastcallcc void (%struct.C*, ...)* [[CALLEE]](%struct.C* inreg %{{.*}}, ...)
-// CHECK32-NEXT: ret void
-// CHECK32: }
-//
-// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BCA at AA"(%struct.C* %this, ...)
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)** %{{.*}}, i64 4
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...)* [[CALLEE]](%struct.C* %{{.*}}, ...)
-// CHECK64: ret void
// CHECK64: }
Modified: cfe/trunk/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp?rev=216791&r1=216790&r2=216791&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp Fri Aug 29 17:06:20 2014
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -triple i686-pc-windows-msvc %s -emit-llvm-only -verify
+// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm-only -verify
// We reject this because LLVM doesn't forward the second regparm through the
// thunk.
struct A {
- virtual void __fastcall f(int a, int b);
+ virtual void __fastcall f(int a, int b); // expected-error {{cannot compile this pointer to fastcall virtual member function yet}}
};
void (__fastcall A::*doit())(int, int) {
- return &A::f; // expected-error {{cannot compile this pointer to fastcall virtual member function yet}}
+ return &A::f;
}
More information about the cfe-commits
mailing list