From dfaf82ac2d9635ad075642efb948f2c9fbf190ce Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sat, 9 Aug 2008 22:01:55 +0000 Subject: [PATCH] Handle BuiltinType::WChar inside CodeGenTypes::ConvertNewType(). llvm-svn: 54593 --- clang/lib/CodeGen/CodeGenTypes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index db053aebb8a2..649a6f93d556 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/lib/CodeGen/CodeGenTypes.cpp @@ -195,6 +195,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) { assert(0 && "Non-canonical type, shouldn't happen"); case Type::Builtin: { switch (cast(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(Context.getTypeSize(T)));