[Lldb-commits] [lldb] r143246 - /lldb/trunk/source/Symbol/ClangASTContext.cpp

Greg Clayton gclayton at apple.com
Fri Oct 28 16:06:08 PDT 2011


Author: gclayton
Date: Fri Oct 28 18:06:08 2011
New Revision: 143246

URL: http://llvm.org/viewvc/llvm-project?rev=143246&view=rev
Log:
Added support for C++0x char16_t and char32_t types.


Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=143246&r1=143245&r2=143246&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Oct 28 18:06:08 2011
@@ -726,10 +726,13 @@
 
         case DW_ATE_lo_user:
             // This has been seen to mean DW_AT_complex_integer
-            if (::strstr(type_name, "complex"))
+            if (type_name)
             {
-                clang_type_t complex_int_clang_type = GetBuiltinTypeForDWARFEncodingAndBitSize ("int", DW_ATE_signed, bit_size/2);
-                return ast->getComplexType (QualType::getFromOpaquePtr(complex_int_clang_type)).getAsOpaquePtr();
+                if (::strstr(type_name, "complex"))
+                {
+                    clang_type_t complex_int_clang_type = GetBuiltinTypeForDWARFEncodingAndBitSize ("int", DW_ATE_signed, bit_size/2);
+                    return ast->getComplexType (QualType::getFromOpaquePtr(complex_int_clang_type)).getAsOpaquePtr();
+                }
             }
             break;
             
@@ -884,6 +887,20 @@
 
         case DW_ATE_imaginary_float:
             break;
+                
+        case DW_ATE_UTF:
+            if (type_name)
+            {
+                if (streq(type_name, "char16_t"))
+                {
+                    return ast->Char16Ty.getAsOpaquePtr();
+                }
+                else if (streq(type_name, "char32_t"))
+                {
+                    return ast->Char32Ty.getAsOpaquePtr();
+                }
+            }
+            break;
         }
     }
     // This assert should fire for anything that we don't catch above so we know





More information about the lldb-commits mailing list