[cfe-commits] r160131 - in /cfe/trunk/test/CodeGenCXX: mangle-ms-back-references-pr13207.cpp mangle-ms-back-references.cpp

Timur Iskhodzhanov timurrrr at google.com
Thu Jul 12 07:33:58 PDT 2012


Author: timurrrr
Date: Thu Jul 12 09:33:58 2012
New Revision: 160131

URL: http://llvm.org/viewvc/llvm-project?rev=160131&view=rev
Log:
[Windows] Split the back reference tests into two separate files as the templates are getting hairy

Added:
    cfe/trunk/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp   (with props)
Modified:
    cfe/trunk/test/CodeGenCXX/mangle-ms-back-references.cpp

Added: cfe/trunk/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp?rev=160131&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp (added)
+++ cfe/trunk/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp Thu Jul 12 09:33:58 2012
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -fms-extensions -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+
+// NOTE on the "CURRENT" prefix: some things are mangled incorrectly as of
+// writing. If you find a CURRENT-test that fails with your patch, please test
+// if your patch has actually fixed a problem in the mangler and replace the
+// corresponding CORRECT line with a CHECK.
+// RUN: %clang_cc1 -fms-extensions -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck -check-prefix CURRENT %s
+
+namespace PR13207 {
+class A {};
+class B {};
+class C {};
+
+template<class X>
+class F {};
+template<class X>
+class I {};
+template<class X, class Y>
+class J {};
+template<class X, class Y, class Z>
+class K {};
+
+class L {
+ public:
+  void foo(I<A> x) {}
+};
+// CHECK: "\01?foo at L@PR13207@@QAEXV?$I at VA@PR13207@@@2@@Z"
+
+void call_l_foo(L* l) { l->foo(I<A>()); }
+
+void foo(I<A> x) {}
+// CHECK: "\01?foo at PR13207@@YAXV?$I at VA@PR13207@@@1@@Z"
+void foo2(I<A> x, I<A> y) { }
+// CHECK "\01?foo2 at PR13207@@YAXV?$I at VA@PR13207@@@1 at 0@Z"
+void bar(J<A,B> x) {}
+// CHECK: "\01?bar at PR13207@@YAXV?$J at VA@PR13207@@VB at 2@@1@@Z"
+void spam(K<A,B,C> x) {}
+// CHECK: "\01?spam at PR13207@@YAXV?$K at VA@PR13207@@VB at 2@VC at 2@@1@@Z"
+
+// The following CURRENT line is here to improve the precision of the "scanning
+// from here" reports of FileCheck.
+// CURRENT: "\01?spam at PR13207@@YAXV?$K at VA@PR13207@@VB at 2@VC at 2@@1@@Z"
+
+// The tests below currently fail:
+void baz(K<char, F<char>, I<char> >) {}
+// CURRENT: "\01?baz at PR13207@@YAXV?$K at DV?$F at D@PR13207@@V?$I at D@1@@1@@Z"
+// CORRECT: "\01?baz at PR13207@@YAXV?$K at DV?$F at D@PR13207@@V?$I at D@2@@1@@Z"
+void qux(K<char, I<char>, I<char> >) {}
+// CURRENT: "\01?qux at PR13207@@YAXV?$K at DV?$I at D@PR13207@@V?$I at D@1@@1@@Z"
+// CORRECT: "\01?qux at PR13207@@YAXV?$K at DV?$I at D@PR13207@@V12@@1@@Z
+
+namespace NA {
+class X {};
+template<class T> class Y {};
+void foo(Y<X> x) {}
+// CHECK: "\01?foo at NA@PR13207@@YAXV?$Y at VX@NA at PR13207@@@12@@Z"
+}
+
+namespace NB {
+class X {};
+template<class T> class Y {};
+void foo(Y<NA::X> x) {}
+// CHECK: "\01?foo at NB@PR13207@@YAXV?$Y at VX@NA at PR13207@@@12@@Z"
+
+void bar(NA::Y<X> x) {}
+// CHECK: "\01?bar at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@NA at 2@@Z"
+
+void spam(NA::Y<NA::X> x) {}
+// CHECK: "\01?spam at NB@PR13207@@YAXV?$Y at VX@NA at PR13207@@@NA at 2@@Z"
+
+// The tests below currently fail:
+void foobar(NA::Y<Y<X> > a, Y<Y<X> >) {}
+// CURRENT: "\01?foobar at NB@PR13207@@YAXV?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12@@Z"
+// CORRECT: "\01?foobar at NB@PR13207@@YAXV?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V312@@Z"
+
+void foobarspam(Y<X> a, NA::Y<Y<X> > b, Y<Y<X> >) {}
+// CURRENT: "\01?foobarspam at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12@@Z"
+// CORRECT: "\01?foobarspam at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V412@@Z"
+
+void foobarbaz(Y<X> a, NA::Y<Y<X> > b, Y<Y<X> >, Y<Y<X> > c) {}
+// CURRENT: "\01?foobarbaz at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12 at 2@Z"
+// CORRECT: "\01?foobarbaz at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V412 at 2@Z"
+
+void foobarbazqux(Y<X> a, NA::Y<Y<X> > b, Y<Y<X> >, Y<Y<X> > c , NA::Y<Y<Y<X> > > d) {}
+// CURRENT: "\01?foobarbazqux at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12 at 2V?$Y at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NB at PR13207@@@32@@Z"
+// CORRECT: "\01?foobarbazqux at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V412 at 2V?$Y at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NB at PR13207@@@52@@Z"
+}
+
+namespace NC {
+class X {};
+template<class T> class Y {};
+
+void foo(Y<NB::X> x) {}
+// CHECK: "\01?foo at NC@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12@@Z"
+
+void foobar(NC::Y<NB::Y<NA::Y<NA::X> > > x) {}
+// CHECK: "\01?foobar at NC@PR13207@@YAXV?$Y at V?$Y at V?$Y at VX@NA at PR13207@@@NA at PR13207@@@NB at PR13207@@@12@@Z"
+}
+}

Propchange: cfe/trunk/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp
------------------------------------------------------------------------------
    svn:eol-style = LF

Modified: cfe/trunk/test/CodeGenCXX/mangle-ms-back-references.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-ms-back-references.cpp?rev=160131&r1=160130&r2=160131&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms-back-references.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-ms-back-references.cpp Thu Jul 12 09:33:58 2012
@@ -1,11 +1,5 @@
 // RUN: %clang_cc1 -fms-extensions -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
 
-// NOTE on the "CURRENT" prefix: some things are mangled incorrectly as of
-// writing. If you find a CURRENT-test that fails with your patch, please test
-// if your patch has actually fixed a problem in the mangler and replace the
-// corresponding CORRECT line with a CHECK.
-// RUN: %clang_cc1 -fms-extensions -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck -check-prefix CURRENT %s
-
 void f1(const char* a, const char* b) {}
 // CHECK: "\01?f1@@YAXPBD0 at Z"
 
@@ -67,95 +61,3 @@
 
 PInt3Func h3(PInt3Func x, PInt3Func y, int* z) { return 0; }
 // CHECK: "\01?h3@@YAP6APAHPAH0 at ZP6APAH00@Z10 at Z"
-
-namespace PR13207 {
-class A {};
-class B {};
-class C {};
-
-template<class X>
-class F {};
-template<class X>
-class I {};
-template<class X, class Y>
-class J {};
-template<class X, class Y, class Z>
-class K {};
-
-class L {
- public:
-  void foo(I<A> x) {}
-};
-// CHECK: "\01?foo at L@PR13207@@QAEXV?$I at VA@PR13207@@@2@@Z"
-
-void call_l_foo(L* l) { l->foo(I<A>()); }
-
-void foo(I<A> x) {}
-// CHECK: "\01?foo at PR13207@@YAXV?$I at VA@PR13207@@@1@@Z"
-void foo2(I<A> x, I<A> y) { }
-// CHECK "\01?foo2 at PR13207@@YAXV?$I at VA@PR13207@@@1 at 0@Z"
-void bar(J<A,B> x) {}
-// CHECK: "\01?bar at PR13207@@YAXV?$J at VA@PR13207@@VB at 2@@1@@Z"
-void spam(K<A,B,C> x) {}
-// CHECK: "\01?spam at PR13207@@YAXV?$K at VA@PR13207@@VB at 2@VC at 2@@1@@Z"
-
-// The following CURRENT line is here to improve the precision of the "scanning
-// from here" reports of FileCheck.
-// CURRENT: "\01?spam at PR13207@@YAXV?$K at VA@PR13207@@VB at 2@VC at 2@@1@@Z"
-
-// The tests below currently fail:
-void baz(K<char, F<char>, I<char> >) {}
-// CURRENT: "\01?baz at PR13207@@YAXV?$K at DV?$F at D@PR13207@@V?$I at D@1@@1@@Z"
-// CORRECT: "\01?baz at PR13207@@YAXV?$K at DV?$F at D@PR13207@@V?$I at D@2@@1@@Z"
-void qux(K<char, I<char>, I<char> >) {}
-// CURRENT: "\01?qux at PR13207@@YAXV?$K at DV?$I at D@PR13207@@V?$I at D@1@@1@@Z"
-// CORRECT: "\01?qux at PR13207@@YAXV?$K at DV?$I at D@PR13207@@V12@@1@@Z
-
-namespace NA {
-class X {};
-template<class T> class Y {};
-void foo(Y<X> x) {}
-// CHECK: "\01?foo at NA@PR13207@@YAXV?$Y at VX@NA at PR13207@@@12@@Z"
-}
-
-namespace NB {
-class X {};
-template<class T> class Y {};
-void foo(Y<NA::X> x) {}
-// CHECK: "\01?foo at NB@PR13207@@YAXV?$Y at VX@NA at PR13207@@@12@@Z"
-
-void bar(NA::Y<X> x) {}
-// CHECK: "\01?bar at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@NA at 2@@Z"
-
-void spam(NA::Y<NA::X> x) {}
-// CHECK: "\01?spam at NB@PR13207@@YAXV?$Y at VX@NA at PR13207@@@NA at 2@@Z"
-
-// The tests below currently fail:
-void foobar(NA::Y<Y<X> > a, Y<Y<X> >) {}
-// CURRENT: "\01?foobar at NB@PR13207@@YAXV?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12@@Z"
-// CORRECT: "\01?foobar at NB@PR13207@@YAXV?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V312@@Z"
-
-void foobarspam(Y<X> a, NA::Y<Y<X> > b, Y<Y<X> >) {}
-// CURRENT: "\01?foobarspam at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12@@Z"
-// CORRECT: "\01?foobarspam at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V412@@Z"
-
-void foobarbaz(Y<X> a, NA::Y<Y<X> > b, Y<Y<X> >, Y<Y<X> > c) {}
-// CURRENT: "\01?foobarbaz at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12 at 2@Z"
-// CORRECT: "\01?foobarbaz at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V412 at 2@Z"
-
-void foobarbazqux(Y<X> a, NA::Y<Y<X> > b, Y<Y<X> >, Y<Y<X> > c , NA::Y<Y<Y<X> > > d) {}
-// CURRENT: "\01?foobarbazqux at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@12 at 2V?$Y at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NB at PR13207@@@32@@Z"
-// CORRECT: "\01?foobarbazqux at NB@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12 at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NA at 2@V412 at 2V?$Y at V?$Y at V?$Y at VX@NB at PR13207@@@NB at PR13207@@@NB at PR13207@@@52@@Z"
-}
-
-namespace NC {
-class X {};
-template<class T> class Y {};
-
-void foo(Y<NB::X> x) {}
-// CHECK: "\01?foo at NC@PR13207@@YAXV?$Y at VX@NB at PR13207@@@12@@Z"
-
-void foobar(NC::Y<NB::Y<NA::Y<NA::X> > > x) {}
-// CHECK: "\01?foobar at NC@PR13207@@YAXV?$Y at V?$Y at V?$Y at VX@NA at PR13207@@@NA at PR13207@@@NB at PR13207@@@12@@Z"
-}
-}





More information about the cfe-commits mailing list