]> granicus.if.org Git - clang/commitdiff
Provide an Objective C mangling for wchar_t. Patch by Nico Weber!
authorJohn McCall <rjmccall@apple.com>
Fri, 11 Jun 2010 10:11:05 +0000 (10:11 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 11 Jun 2010 10:11:05 +0000 (10:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105818 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp
test/SemaTemplate/instantiate-objc-1.mm

index 1cc8eb8fb2c66ecd9b2ad3a66fefc2b746de7811..e2074e8b741a9f09b2d9146f7d2b447320b35fb9 100644 (file)
@@ -3477,6 +3477,7 @@ static char ObjCEncodingForPrimitiveKind(const ASTContext *C, QualType T) {
     case BuiltinType::Char_S:
     case BuiltinType::SChar:      return 'c';
     case BuiltinType::Short:      return 's';
+    case BuiltinType::WChar:
     case BuiltinType::Int:        return 'i';
     case BuiltinType::Long:
       return
index 92d0d6c95080ab987be9705bba043a48ef861d5d..2780f8e5797835382df767f0d52b32a9265ff969 100644 (file)
@@ -45,3 +45,4 @@ template <typename T> struct EncodeTest {
 
 template struct EncodeTest<int>;
 template struct EncodeTest<double>;
+template struct EncodeTest<wchar_t>;