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 | f6e9ece5075a5ea007922ef72246470653fade1b (patch) | |
tree | b1ef4dea85b6cc587eaf4fec88bda990d9e1df56 /clang/test/CodeGenCXX/mangle.cpp | |
parent | 4579b76ff60fcb99c2699f7a9026a4fd18e460be (diff) | |
download | bcm5719-llvm-f6e9ece5075a5ea007922ef72246470653fade1b.tar.gz bcm5719-llvm-f6e9ece5075a5ea007922ef72246470653fade1b.zip |
Name mangling for class template specializations and template arguments.
llvm-svn: 71861
Diffstat (limited to 'clang/test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp index c49abeb7efe..3f4d6fb706d 100644 --- a/clang/test/CodeGenCXX/mangle.cpp +++ b/clang/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>) {} |