diff options
author | Anders Carlsson <andersca@mac.com> | 2009-09-27 20:11:34 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-09-27 20:11:34 +0000 |
commit | 50755b0dcc81eed9dcf27abe9162527013f26bd4 (patch) | |
tree | ea6fad7222c114b50031eb03765193cbe89c410c /test/CodeGenCXX/mangle.cpp | |
parent | e45117b945a0d8c1fdcc4cd8ee4500f5ee8742be (diff) |
Mangle dependent name expressions. Fixes PR5063.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index a55f5b97fe..86f5fb0d5b 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -180,3 +180,21 @@ template <typename T> typename T::U ft6(const T&) { return 0; } // CHECK: @_Z3ft6I1SENT_1UERKS1_ template int ft6<S>(const S&); + +template<typename> struct __is_scalar { + enum { __value = 1 }; +}; + +template<bool, typename> struct __enable_if { }; + +template<typename T> struct __enable_if<true, T> { + typedef T __type; +}; + +// PR5063 +template<typename T> typename __enable_if<__is_scalar<T>::__value, void>::__type ft7() { } + +// CHECK: @_Z3ft7IiEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +template void ft7<int>(); +// CHECK: @_Z3ft7IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +template void ft7<void*>(); |