diff options
author | Anders Carlsson <andersca@mac.com> | 2009-05-15 16:09:15 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-05-15 16:09:15 +0000 |
commit | 7a0ba875a7dcee94ec74fa79b7f8a247d200a76c (patch) | |
tree | 5546b60d81db578332e09a7274b8275db9f6254b /test/CodeGenCXX/mangle.cpp | |
parent | dcdecf4a777e503b24de6b15a054d580b585c06c (diff) |
Name mangling for class template specializations and template arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index c49abeb7ef..3f4d6fb706 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -49,5 +49,31 @@ namespace N { int f(int, int) { static int b; return b; } } // RUN: grep "_ZGVZN1N1gEvE1a =" %t | count 1 && namespace N { int h(); void g() { static int a = h(); } } -// RUN: grep "_Z1fno" %t | count 1 +// RUN: grep "_Z1fno" %t | count 1 && void f(__int128_t, __uint128_t) { } + +template <typename T> struct S1 {}; + +// RUN: grep "_Z1f2S1IiE" %t | count 1 && +void f(S1<int>) {} + +// RUN: grep "_Z1f2S1IdE" %t | count 1 && +void f(S1<double>) {} + +template <int N> struct S2 {}; +// RUN: grep "_Z1f2S2ILi100EE" %t | count 1 && +void f(S2<100>) {} + +// RUN: grep "_Z1f2S2ILin100EE" %t | count 1 && +void f(S2<-100>) {} + +template <bool B> struct S3 {}; + +// RUN: grep "_Z1f2S3ILb1EE" %t | count 1 && +void f(S3<true>) {} + +// RUN: grep "_Z1f2S3ILb0EE" %t | count 1 && +void f(S3<false>) {} + +// RUN: grep "_Z2f22S3ILb1EE" %t | count 1 +void f2(S3<100>) {} |