From 65497cce201e667d11b436d24afbcc5d7ca786a8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 27 Apr 2011 23:09:49 +0000 Subject: t/clang/type-traits Patch authored by John Wiegley. These type traits are used for parsing code that employs certain features of the Embarcadero C++ compiler. Several of these constructs are also desired by libc++, according to its project pages (such as __is_standard_layout). llvm-svn: 130342 --- clang/test/CodeGenCXX/mangle.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'clang/test/CodeGenCXX/mangle.cpp') diff --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp index 05cc5587e1d..27777a51c4f 100644 --- a/clang/test/CodeGenCXX/mangle.cpp +++ b/clang/test/CodeGenCXX/mangle.cpp @@ -183,7 +183,7 @@ template typename T::U ft6(const T&) { return 0; } // CHECK: @_Z3ft6I1SENT_1UERKS1_ template int ft6(const S&); -template struct __is_scalar { +template struct __is_scalar_type { enum { __value = 1 }; }; @@ -194,11 +194,11 @@ template struct __enable_if { }; // PR5063 -template typename __enable_if<__is_scalar::__value, void>::__type ft7() { } +template typename __enable_if<__is_scalar_type::__value, void>::__type ft7() { } -// CHECK: @_Z3ft7IiEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +// CHECK: @_Z3ft7IiEN11__enable_ifIXsr16__is_scalar_typeIT_E7__valueEvE6__typeEv template void ft7(); -// CHECK: @_Z3ft7IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +// CHECK: @_Z3ft7IPvEN11__enable_ifIXsr16__is_scalar_typeIT_E7__valueEvE6__typeEv template void ft7(); // PR5144 @@ -225,15 +225,15 @@ struct S7 { S7::S7() {} // PR5063 -template typename __enable_if<(__is_scalar::__value), void>::__type ft8() { } -// CHECK: @_Z3ft8IiEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +template typename __enable_if<(__is_scalar_type::__value), void>::__type ft8() { } +// CHECK: @_Z3ft8IiEN11__enable_ifIXsr16__is_scalar_typeIT_E7__valueEvE6__typeEv template void ft8(); -// CHECK: @_Z3ft8IPvEN11__enable_ifIXsr11__is_scalarIT_E7__valueEvE6__typeEv +// CHECK: @_Z3ft8IPvEN11__enable_ifIXsr16__is_scalar_typeIT_E7__valueEvE6__typeEv template void ft8(); // PR5796 namespace PR5796 { -template struct __is_scalar { +template struct __is_scalar_type { enum { __value = 0 }; }; @@ -241,8 +241,8 @@ template struct __enable_if {}; template struct __enable_if { typedef T __type; }; template -// CHECK: define linkonce_odr void @_ZN6PR57968__fill_aIiEENS_11__enable_ifIXntsrNS_11__is_scalarIT_EE7__valueEvE6__typeEv -typename __enable_if::__value, void>::__type __fill_a() { }; +// CHECK: define linkonce_odr void @_ZN6PR57968__fill_aIiEENS_11__enable_ifIXntsrNS_16__is_scalar_typeIT_EE7__valueEvE6__typeEv +typename __enable_if::__value, void>::__type __fill_a() { }; void f() { __fill_a(); } } -- cgit v1.2.3