[cfe-commits] r95060 - in /cfe/trunk/test/CodeGenCXX: member-pointer-cast.cpp pointers-to-data-members.cpp

Anders Carlsson andersca at mac.com
Mon Feb 1 19:23:39 PST 2010


Author: andersca
Date: Mon Feb  1 21:23:38 2010
New Revision: 95060

URL: http://llvm.org/viewvc/llvm-project?rev=95060&view=rev
Log:
Rename a test.

Added:
    cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp
Removed:
    cfe/trunk/test/CodeGenCXX/member-pointer-cast.cpp

Removed: cfe/trunk/test/CodeGenCXX/member-pointer-cast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/member-pointer-cast.cpp?rev=95059&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenCXX/member-pointer-cast.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/member-pointer-cast.cpp (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin9 | FileCheck %s
-
-struct A { int a; };
-struct B { int b; };
-struct C : B, A { };
-
-int A::*pa;
-int C::*pc;
-
-void f() {
-  // CHECK: store i64 -1, i64* @pa
-  pa = 0;
-
-  // CHECK: [[ADJ:%[a-zA-Z0-9\.]+]] = add i64 {{.*}}, 4
-  // CHECK: store i64 [[ADJ]], i64* @pc
-  pc = pa;
-
-  // CHECK: [[ADJ:%[a-zA-Z0-9\.]+]] = sub i64 {{.*}}, 4
-  // CHECK: store i64 [[ADJ]], i64* @pa
-  pa = static_cast<int A::*>(pc);
-}

Added: cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp?rev=95060&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/pointers-to-data-members.cpp Mon Feb  1 21:23:38 2010
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin10 | FileCheck %s
+
+struct A { int a; };
+struct B { int b; };
+struct C : B, A { };
+
+// Casts.
+namespace Casts {
+
+int A::*pa;
+int C::*pc;
+
+void f() {
+  // CHECK: store i64 -1, i64* @_ZN5Casts2paE
+  pa = 0;
+
+  // CHECK: [[ADJ:%[a-zA-Z0-9\.]+]] = add i64 {{.*}}, 4
+  // CHECK: store i64 [[ADJ]], i64* @_ZN5Casts2pcE
+  pc = pa;
+
+  // CHECK: [[ADJ:%[a-zA-Z0-9\.]+]] = sub i64 {{.*}}, 4
+  // CHECK: store i64 [[ADJ]], i64* @_ZN5Casts2paE
+  pa = static_cast<int A::*>(pc);
+}
+
+}





More information about the cfe-commits mailing list