r227029 - Rename four test files from .C to .cpp.
Nico Weber
nicolasweber at gmx.de
Sat Jan 24 18:04:36 PST 2015
Author: nico
Date: Sat Jan 24 20:04:36 2015
New Revision: 227029
URL: http://llvm.org/viewvc/llvm-project?rev=227029&view=rev
Log:
Rename four test files from .C to .cpp.
lit.cfg has never supported running .C files, so these tests were never
executed by check-clang. Rename them to .cpp so that they run as part of
the test suite, and minorly tweak two of them that look like they were broken
when checked in to actually pass.
Added:
cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.cpp
- copied, changed from r227012, cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C
cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.cpp
- copied, changed from r227012, cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C
cfe/trunk/test/CodeGenCXX/apple-kext-linkage.cpp
- copied unchanged from r227012, cfe/trunk/test/CodeGenCXX/apple-kext-linkage.C
cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
- copied unchanged from r227012, cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.C
Removed:
cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C
cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C
cfe/trunk/test/CodeGenCXX/apple-kext-linkage.C
cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.C
Removed: cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C?rev=227028&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C (removed)
@@ -1,77 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
-
-// CHECK: @_ZTV1A = unnamed_addr constant [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK1A3abcEv to i8*), i8* null]
-// CHECK: @_ZTV4Base = unnamed_addr constant [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK4Base3abcEv to i8*), i8* null]
-// CHECK: @_ZTV8Derived2 = unnamed_addr constant [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK8Derived23efgEv to i8*), i8* null]
-// CHECK: @_ZTV2D2 = unnamed_addr constant [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK2D23abcEv to i8*), i8* null]
-
-struct A {
- virtual const char* abc(void) const;
-};
-
-const char* A::abc(void) const {return "A"; };
-
-struct B : virtual A {
- virtual void VF();
-};
-
-void B::VF() {}
-
-void FUNC(B* p) {
-// CHECK: [[T1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([4 x i8*]* @_ZTV1A to i8* (%struct.A*)**), i64 2)
-// CHECK-NEXT: [[T2:%.*]] = call i8* [[T1]]
- const char* c = p->A::abc();
-}
-
-
-// Test2
-struct Base { virtual char* abc(void) const; };
-
-char* Base::abc() const { return 0; }
-
-struct Derived : public Base {
-};
-
-void FUNC1(Derived* p) {
-// CHECK: [[U1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([4 x i8*]* @_ZTV4Base to i8* (%struct.A*)**), i64 2)
-// CHECK-NEXT: [[U2:%.*]] = call i8* [[U1]]
- char* c = p->Base::abc();
-}
-
-
-// Test3
-struct Base2 { };
-
-struct Derived2 : virtual Base2 {
- virtual char* efg(void) const;
-};
-
-char* Derived2::efg(void) const { return 0; }
-
-void FUNC2(Derived2* p) {
-// CHECK: [[V1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([5 x i8*]* @_ZTV8Derived2 to i8* (%struct.A*)**), i64 3)
-// CHECK-NEXT: [[V2:%.*]] = call i8* [[V1]]
- char* c = p->Derived2::efg();
-}
-
-// Test4
-struct Base3 { };
-
-struct D1 : virtual Base3 {
-};
-
-struct D2 : virtual Base3 {
- virtual char *abc(void) const;
-};
-
-struct Sub : D1, D2 {
-};
-
-char* D2::abc(void) const { return 0; }
-
-void FUNC3(Sub* p) {
-// CHECK: [[W1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([5 x i8*]* @_ZTV2D2 to i8* (%struct.A*)**), i64 3)
-// CHECK-NEXT: [[W2:%.*]] = call i8* [[W1]]
- char* c = p->D2::abc();
-}
-
Copied: cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.cpp (from r227012, cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.cpp?p2=cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.cpp&p1=cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C&r1=227012&r2=227029&rev=227029&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.C (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call-2.cpp Sat Jan 24 20:04:36 2015
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
// CHECK: @_ZTV1A = unnamed_addr constant [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK1A3abcEv to i8*), i8* null]
-// CHECK: @_ZTV4Base = unnamed_addr constant [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK4Base3abcEv to i8*), i8* null]
-// CHECK: @_ZTV8Derived2 = unnamed_addr constant [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK8Derived23efgEv to i8*), i8* null]
-// CHECK: @_ZTV2D2 = unnamed_addr constant [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK2D23abcEv to i8*), i8* null]
+// CHECK: @_ZTV4Base = unnamed_addr constant [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.Base*)* @_ZNK4Base3abcEv to i8*), i8* null]
+// CHECK: @_ZTV8Derived2 = unnamed_addr constant [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.Derived2*)* @_ZNK8Derived23efgEv to i8*), i8* null]
+// CHECK: @_ZTV2D2 = unnamed_addr constant [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.D2*)* @_ZNK2D23abcEv to i8*), i8* null]
struct A {
virtual const char* abc(void) const;
@@ -33,7 +33,7 @@ struct Derived : public Base {
};
void FUNC1(Derived* p) {
-// CHECK: [[U1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([4 x i8*]* @_ZTV4Base to i8* (%struct.A*)**), i64 2)
+// CHECK: [[U1:%.*]] = load i8* (%struct.Base*)** getelementptr inbounds (i8* (%struct.Base*)** bitcast ([4 x i8*]* @_ZTV4Base to i8* (%struct.Base*)**), i64 2)
// CHECK-NEXT: [[U2:%.*]] = call i8* [[U1]]
char* c = p->Base::abc();
}
@@ -49,7 +49,7 @@ struct Derived2 : virtual Base2 {
char* Derived2::efg(void) const { return 0; }
void FUNC2(Derived2* p) {
-// CHECK: [[V1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([5 x i8*]* @_ZTV8Derived2 to i8* (%struct.A*)**), i64 3)
+// CHECK: [[V1:%.*]] = load i8* (%struct.Derived2*)** getelementptr inbounds (i8* (%struct.Derived2*)** bitcast ([5 x i8*]* @_ZTV8Derived2 to i8* (%struct.Derived2*)**), i64 3)
// CHECK-NEXT: [[V2:%.*]] = call i8* [[V1]]
char* c = p->Derived2::efg();
}
@@ -70,7 +70,7 @@ struct Sub : D1, D2 {
char* D2::abc(void) const { return 0; }
void FUNC3(Sub* p) {
-// CHECK: [[W1:%.*]] = load i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)** bitcast ([5 x i8*]* @_ZTV2D2 to i8* (%struct.A*)**), i64 3)
+// CHECK: [[W1:%.*]] = load i8* (%struct.D2*)** getelementptr inbounds (i8* (%struct.D2*)** bitcast ([5 x i8*]* @_ZTV2D2 to i8* (%struct.D2*)**), i64 3)
// CHECK-NEXT: [[W2:%.*]] = call i8* [[W1]]
char* c = p->D2::abc();
}
Removed: cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C?rev=227028&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C (removed)
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s
-
-struct Base {
- virtual void abc(void) const;
-};
-
-void Base::abc(void) const {}
-
-void FUNC(Base* p) {
- p->Base::abc();
-}
-
-// CHECK: getelementptr inbounds (void (%struct.Base*)** bitcast ([3 x i8*]* @_ZTV4Base to void (%struct.Base*)**), i64 2)
-// CHECK-NOT: call void @_ZNK4Base3abcEv
Copied: cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.cpp (from r227012, cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.cpp?p2=cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.cpp&p1=cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C&r1=227012&r2=227029&rev=227029&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.C (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-indirect-call.cpp Sat Jan 24 20:04:36 2015
@@ -10,5 +10,5 @@ void FUNC(Base* p) {
p->Base::abc();
}
-// CHECK: getelementptr inbounds (void (%struct.Base*)** bitcast ([3 x i8*]* @_ZTV4Base to void (%struct.Base*)**), i64 2)
+// CHECK: getelementptr inbounds (void (%struct.Base*)** bitcast ([4 x i8*]* @_ZTV4Base to void (%struct.Base*)**), i64 2)
// CHECK-NOT: call void @_ZNK4Base3abcEv
Removed: cfe/trunk/test/CodeGenCXX/apple-kext-linkage.C
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-linkage.C?rev=227028&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-linkage.C (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-linkage.C (removed)
@@ -1,33 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s
-
-struct Base {
- virtual ~Base();
-} ;
-
-struct Derived : Base {
- void operator delete(void *) { }
- Derived();
-};
-
-void foo() {
- Derived d1; // ok
-}
-
-// CHECK-LABEL: define internal i32 @_Z1fj(
-inline unsigned f(unsigned n) { return n == 0 ? 0 : n + f(n-1); }
-
-unsigned g(unsigned n) { return f(n); }
-
-// rdar://problem/10133200: give explicit instantiations external linkage in kernel mode
-// CHECK-LABEL: define void @_Z3barIiEvv()
-template <typename T> void bar() {}
-template void bar<int>();
-
-// CHECK-LABEL: define internal i32 @_Z5identIiET_S0_(
-template <typename X> X ident(X x) { return x; }
-
-int foo(int n) { return ident(n); }
-
-// CHECK-LABEL: define internal void @_ZN7DerivedD1Ev(
-// CHECK-LABEL: define internal void @_ZN7DerivedD0Ev(
-// CHECK-LABEL: define internal void @_ZN7DeriveddlEPv(
Removed: cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.C
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.C?rev=227028&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.C (original)
+++ cfe/trunk/test/CodeGenCXX/apple-kext-no-staticinit-section.C (removed)
@@ -1,20 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
-// rdar://8825235
-/**
-1) Normally, global object construction code ends up in __StaticInit segment of text section
- .section __TEXT,__StaticInit,regular,pure_instructions
- In kext mode, they end up in the __text segment.
-*/
-
-class foo {
-public:
- foo();
- virtual ~foo();
-};
-
-foo a;
-foo b;
-foo c;
-foo::~foo() {}
-
-// CHECK-NOT: __TEXT,__StaticInit,regular,pure_instructions
More information about the cfe-commits
mailing list