]> granicus.if.org Git - clang/commitdiff
Handle BuiltinType::WChar inside CodeGenTypes::ConvertNewType().
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 9 Aug 2008 22:01:55 +0000 (22:01 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 9 Aug 2008 22:01:55 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54593 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenTypes.cpp

index db053aebb8a235c6a78f88458323e6e8902a3c0c..649a6f93d556e73ab3fe90ef34e1c70bf7364161 100644 (file)
@@ -195,6 +195,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
     assert(0 && "Non-canonical type, shouldn't happen");
   case Type::Builtin: {
     switch (cast<BuiltinType>(Ty).getKind()) {
+    default: assert(0 && "Unknown builtin type!");
     case BuiltinType::Void:
       // LLVM void type can only be used as the result of a function call.  Just
       // map to the same as char.
@@ -216,6 +217,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
     case BuiltinType::ULong:
     case BuiltinType::LongLong:
     case BuiltinType::ULongLong:
+    case BuiltinType::WChar:
       return llvm::IntegerType::get(
         static_cast<unsigned>(Context.getTypeSize(T)));