Emit debug info for wchar_t.

llvm-svn: 139443
This commit is contained in:
Devang Patel 2011-09-10 00:44:49 +00:00
parent abc5fbe9d6
commit 964d758d17
2 changed files with 9 additions and 0 deletions

View File

@ -333,16 +333,20 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) {
case BuiltinType::UChar:
case BuiltinType::Char_U: Encoding = llvm::dwarf::DW_ATE_unsigned_char; break;
case BuiltinType::Char_S:
case BuiltinType::Char16:
case BuiltinType::Char32:
case BuiltinType::SChar: Encoding = llvm::dwarf::DW_ATE_signed_char; break;
case BuiltinType::UShort:
case BuiltinType::UInt:
case BuiltinType::UInt128:
case BuiltinType::ULong:
case BuiltinType::WChar_U:
case BuiltinType::ULongLong: Encoding = llvm::dwarf::DW_ATE_unsigned; break;
case BuiltinType::Short:
case BuiltinType::Int:
case BuiltinType::Int128:
case BuiltinType::Long:
case BuiltinType::WChar_S:
case BuiltinType::LongLong: Encoding = llvm::dwarf::DW_ATE_signed; break;
case BuiltinType::Bool: Encoding = llvm::dwarf::DW_ATE_boolean; break;
case BuiltinType::Float:

View File

@ -0,0 +1,5 @@
// RUN: %clang_cc1 -emit-llvm -g %s -o -| FileCheck %s
void foo() {
// CHECK: metadata !"wchar_t",
const wchar_t w = L'x';
}