[cfe-commits] r138162 - in /cfe/trunk/test/CodeGenCXX: 2003-11-02-WeakLinkage.cpp 2003-11-18-PtrMemConstantInitializer.cpp 2003-11-25-ReturningOpaqueByValue.cpp 2003-11-27-MultipleInheritanceThunk.cpp 2003-11-29-DuplicatedCleanupTest.cpp 2003-12-08-ArrayOfPtrToMemberFunc.cpp 2004-01-11-DynamicInitializedConstant.cpp

Eric Christopher echristo at apple.com
Fri Aug 19 17:17:18 PDT 2011


Author: echristo
Date: Fri Aug 19 19:17:18 2011
New Revision: 138162

URL: http://llvm.org/viewvc/llvm-project?rev=138162&view=rev
Log:
Migrate, FileCheckize and update:

2003-11-02-WeakLinkage.cpp
2003-11-18-PtrMemConstantInitializer.cpp
2003-11-25-ReturningOpaqueByValue.cpp
2003-11-27-MultipleInheritanceThunk.cpp
2003-11-29-DuplicatedCleanupTest.cpp
2003-12-08-ArrayOfPtrToMemberFunc.cpp
2004-01-11-DynamicInitializedConstant.cpp

from llvm/test/FrontendC++.

Added:
    cfe/trunk/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
    cfe/trunk/test/CodeGenCXX/2003-11-18-PtrMemConstantInitializer.cpp
    cfe/trunk/test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp
    cfe/trunk/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp
    cfe/trunk/test/CodeGenCXX/2003-11-29-DuplicatedCleanupTest.cpp
    cfe/trunk/test/CodeGenCXX/2003-12-08-ArrayOfPtrToMemberFunc.cpp
    cfe/trunk/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp

Added: cfe/trunk/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2003-11-02-WeakLinkage.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// The template should compile to linkonce linkage, not weak linkage.
+
+// CHECK-NOT: weak
+template<class T>
+void thefunc();
+
+template<class T>
+inline void thefunc() {}
+
+void test() {
+  thefunc<int>();
+}

Added: cfe/trunk/test/CodeGenCXX/2003-11-18-PtrMemConstantInitializer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2003-11-18-PtrMemConstantInitializer.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2003-11-18-PtrMemConstantInitializer.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2003-11-18-PtrMemConstantInitializer.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+
+struct Gfx {
+  void opMoveSetShowText();
+};
+
+struct Operator {
+  void (Gfx::*func)();
+};
+
+Operator opTab[] = {
+  {&Gfx::opMoveSetShowText},
+};

Added: cfe/trunk/test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2003-11-25-ReturningOpaqueByValue.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+
+#include <vector>
+std::vector<int> my_method ();
+
+int
+main ()
+{
+  my_method ();
+  return 0;
+}

Added: cfe/trunk/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+
+
+struct CallSite {
+  int X;
+
+  CallSite(const CallSite &CS);
+};
+
+struct AliasAnalysis {
+  int TD;
+
+  virtual int getModRefInfo(CallSite CS);
+};
+
+
+struct Pass {
+  int X;
+  virtual int foo();
+};
+
+struct AliasAnalysisCounter : public Pass, public AliasAnalysis {
+  int getModRefInfo(CallSite CS) {
+    return 0;
+  }
+};
+
+AliasAnalysisCounter AAC;

Added: cfe/trunk/test/CodeGenCXX/2003-11-29-DuplicatedCleanupTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2003-11-29-DuplicatedCleanupTest.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2003-11-29-DuplicatedCleanupTest.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2003-11-29-DuplicatedCleanupTest.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+
+
+void doesntThrow() throw();
+struct F {
+  ~F() { doesntThrow(); }
+};
+
+void atest() {
+  F A;
+lab:
+  F B;
+  goto lab;
+}
+
+void test(int val) {
+label: {
+   F A;
+   F B;
+   if (val == 0) goto label;
+   if (val == 1) goto label;
+}
+}
+
+void test3(int val) {
+label: {
+   F A;
+   F B;
+   if (val == 0) { doesntThrow(); goto label; }
+   if (val == 1) { doesntThrow(); goto label; }
+}
+}
+
+void test4(int val) {
+label: {
+   F A;
+   F B;
+   if (val == 0) { F C; goto label; }
+   if (val == 1) { F D; goto label; }
+}
+}

Added: cfe/trunk/test/CodeGenCXX/2003-12-08-ArrayOfPtrToMemberFunc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2003-12-08-ArrayOfPtrToMemberFunc.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2003-12-08-ArrayOfPtrToMemberFunc.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2003-12-08-ArrayOfPtrToMemberFunc.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+
+struct Evil {
+ void fun ();
+};
+int foo();
+typedef void (Evil::*memfunptr) ();
+static memfunptr jumpTable[] = { &Evil::fun };
+
+void Evil::fun() {
+ (this->*jumpTable[foo()]) ();
+}

Added: cfe/trunk/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp?rev=138162&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/2004-01-11-DynamicInitializedConstant.cpp Fri Aug 19 19:17:18 2011
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+
+// CHECK-NOT: constant
+extern int X;
+const int Y = X;
+const int* foo() { return &Y; }





More information about the cfe-commits mailing list