From a24b299c00792093910f77eb10c01035bca91bb0 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 25 Jan 2015 02:04:36 +0000 Subject: [PATCH] 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. llvm-svn: 227029 --- ...irect-call-2.C => apple-kext-indirect-call-2.cpp} | 12 ++++++------ ...-indirect-call.C => apple-kext-indirect-call.cpp} | 2 +- .../{apple-kext-linkage.C => apple-kext-linkage.cpp} | 0 ...ection.C => apple-kext-no-staticinit-section.cpp} | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename clang/test/CodeGenCXX/{apple-kext-indirect-call-2.C => apple-kext-indirect-call-2.cpp} (68%) rename clang/test/CodeGenCXX/{apple-kext-indirect-call.C => apple-kext-indirect-call.cpp} (84%) rename clang/test/CodeGenCXX/{apple-kext-linkage.C => apple-kext-linkage.cpp} (100%) rename clang/test/CodeGenCXX/{apple-kext-no-staticinit-section.C => apple-kext-no-staticinit-section.cpp} (100%) diff --git a/clang/test/CodeGenCXX/apple-kext-indirect-call-2.C b/clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp similarity index 68% rename from clang/test/CodeGenCXX/apple-kext-indirect-call-2.C rename to clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp index 7e252006e4ad..68ecaf0d5fde 100644 --- a/clang/test/CodeGenCXX/apple-kext-indirect-call-2.C +++ b/clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp @@ -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(); } diff --git a/clang/test/CodeGenCXX/apple-kext-indirect-call.C b/clang/test/CodeGenCXX/apple-kext-indirect-call.cpp similarity index 84% rename from clang/test/CodeGenCXX/apple-kext-indirect-call.C rename to clang/test/CodeGenCXX/apple-kext-indirect-call.cpp index 2dbb0b83954d..6102072ada07 100644 --- a/clang/test/CodeGenCXX/apple-kext-indirect-call.C +++ b/clang/test/CodeGenCXX/apple-kext-indirect-call.cpp @@ -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 diff --git a/clang/test/CodeGenCXX/apple-kext-linkage.C b/clang/test/CodeGenCXX/apple-kext-linkage.cpp similarity index 100% rename from clang/test/CodeGenCXX/apple-kext-linkage.C rename to clang/test/CodeGenCXX/apple-kext-linkage.cpp diff --git a/clang/test/CodeGenCXX/apple-kext-no-staticinit-section.C b/clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp similarity index 100% rename from clang/test/CodeGenCXX/apple-kext-no-staticinit-section.C rename to clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp