diff options
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 4 | ||||
-rw-r--r-- | test/CodeGenCXX/debug-info-char16.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 409a66b28f..0b2bb61e90 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -333,9 +333,9 @@ 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::Char16: + case BuiltinType::Char32: Encoding = llvm::dwarf::DW_ATE_UTF; break; case BuiltinType::UShort: case BuiltinType::UInt: case BuiltinType::UInt128: diff --git a/test/CodeGenCXX/debug-info-char16.cpp b/test/CodeGenCXX/debug-info-char16.cpp new file mode 100644 index 0000000000..c2eaff905c --- /dev/null +++ b/test/CodeGenCXX/debug-info-char16.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -S -std=c++0x -masm-verbose -g %s -o -| FileCheck %s + +//CHECK: .byte 16 ## DW_AT_encoding +char16_t char_a = u'h'; + |