<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 9, 2015, at 2:47 PM, Ryan Brown <<a href="mailto:ribrdb@google.com" class="">ribrdb@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">On Tue, Sep 8, 2015 at 3:10 PM Enrico Granata via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank" class="">lldb-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Author: enrico<br class="">Date: Tue Sep  8 17:09:19 2015<br class="">New Revision: 247082<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=247082&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=247082&view=rev</a><br class="">Log:<br class="">Implement a Target::GetTypeSystemForLanguage API, as well as provide helpers on the TypeSystem to get numeric types of specific sizes and signedness<br class=""><br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>lldb/trunk/include/lldb/Symbol/ClangASTContext.h<br class="">   <span class="Apple-converted-space"> </span>lldb/trunk/include/lldb/Symbol/TypeSystem.h<br class="">   <span class="Apple-converted-space"> </span>lldb/trunk/include/lldb/Target/Target.h<br class="">   <span class="Apple-converted-space"> </span>lldb/trunk/source/DataFormatters/CoreMedia.cpp<br class="">   <span class="Apple-converted-space"> </span>lldb/trunk/source/DataFormatters/VectorType.cpp<br class="">   <span class="Apple-converted-space"> </span>lldb/trunk/source/Target/Target.cpp<br class=""><br class="">Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=247082&r1=247081&r2=247082&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=247082&r1=247081&r2=247082&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)<br class="">+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Tue Sep  8 17:09:19 2015<br class="">@@ -454,7 +454,7 @@ public:<br class="">     //------------------------------------------------------------------<br class=""><br class="">     CompilerType<br class="">-    GetIntTypeFromBitSize (size_t bit_size, bool is_signed)<br class="">+    GetIntTypeFromBitSize (size_t bit_size, bool is_signed) override<br class="">     {<br class="">         return GetIntTypeFromBitSize (getASTContext(), bit_size, is_signed);<br class="">     }<br class="">@@ -477,7 +477,7 @@ public:<br class="">     //------------------------------------------------------------------<br class=""><br class="">     CompilerType<br class="">-    GetFloatTypeFromBitSize (size_t bit_size)<br class="">+    GetFloatTypeFromBitSize (size_t bit_size) override<br class="">     {<br class="">         return GetFloatTypeFromBitSize (getASTContext(), bit_size);<br class="">     }<br class=""><br class="">Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=247082&r1=247081&r2=247082&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=247082&r1=247081&r2=247082&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)<br class="">+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Tue Sep  8 17:09:19 2015<br class="">@@ -400,6 +400,12 @@ public:<br class="">     virtual CompilerType<br class="">     GetBasicTypeFromAST (lldb::BasicType basic_type) = 0;<br class=""><br class="">+    virtual CompilerType<br class="">+    GetIntTypeFromBitSize (size_t bit_size, bool is_signed) = 0;<br class="">+<br class="">+    virtual CompilerType<br class="">+    GetFloatTypeFromBitSize (size_t bit_size) = 0;<br class="">+<br class=""></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Why do these need to be here?</div></div></blockquote><div><br class=""></div><div>They are convenient to have when you are not transacting in terms of “int” or “float” but in terms of “I want a type that can represent a 32-bit unsigned integer value"</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""> It seems like everything using these is clang specific.</div></div></blockquote><div><br class=""></div><div>That might be because at the moment open-source LLDB does not have fully-baked type systems for non-clang languages</div><div>I suspect that most languages have a notion of numeric types of a certain bit-size and signedness, so the API itself is not clang-specific whatsoever</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""> </div><blockquote class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">     virtual bool<br class="">     IsBeingDefined (void *type) = 0;<br class=""><br class=""><br class="">Modified: lldb/trunk/include/lldb/Target/Target.h<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=247082&r1=247081&r2=247082&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=247082&r1=247081&r2=247082&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/include/lldb/Target/Target.h (original)<br class="">+++ lldb/trunk/include/lldb/Target/Target.h Tue Sep  8 17:09:19 2015<br class="">@@ -1230,6 +1230,14 @@ public:<br class="">     ClangASTContext *<br class="">     GetScratchClangASTContext(bool create_on_demand=true);<br class=""><br class="">+    TypeSystem*<br class="">+    GetTypeSystemForLanguage (lldb::LanguageType language);<br class="">+<br class="">+    CompilerType<br class="">+    GetBasicType (lldb::LanguageType language,<br class="">+                  lldb::BasicType basic_type,<br class="">+                  size_t size = 0);<br class="">+<br class=""></blockquote></div></blockquote><div><br class=""></div><div>I am not sure the latter API (Target::GetBasicType) even needs to be there - my bad for checking that in</div><div>The former one (Target::GetTypeSystemForLanguage) is what I truly meant to introduce</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Again, I'm not sure why this needs to be here when all uses are clang specific.</div></div></blockquote><div><br class=""></div><div>Same argument, the API has nothing clang-specific about it. The existing implementation/users are, but that is to be expected since clang is currently the only compiler that <a href="http://llvm.org" class="">llvm.org</a> LLDB is integrated with</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">If it needs to be here, can you add some documentation?</div></div></blockquote><div><br class=""></div><div>Sure thing. Do you have any suggestions as to how to phrase it?</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">When writing a new TypeSystem, does it need to be added to GetTypeSystemForLanguage?</div></div></blockquote><div><br class=""></div><div>Seems about right</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">How would it be used? Do types from this "scratch" type system need to interact with types from a real, symbol file backed type system? </div></div></blockquote><div><br class=""></div><div>Define “interact"</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">What if the sizes of basic types aren't standardized and need to be lookup up in the debug info?</div></div></blockquote><div><br class=""></div><div>I assume this remark is for Target::GetBasicType(), and thus a moot point since I didn’t mean to check that declaration at all, and will remove it soon</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""> </div><blockquote class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">     ClangASTImporter *<br class="">     GetClangASTImporter();<br class=""><br class=""><br class="">Modified: lldb/trunk/source/DataFormatters/CoreMedia.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CoreMedia.cpp?rev=247082&r1=247081&r2=247082&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CoreMedia.cpp?rev=247082&r1=247081&r2=247082&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/source/DataFormatters/CoreMedia.cpp (original)<br class="">+++ lldb/trunk/source/DataFormatters/CoreMedia.cpp Tue Sep  8 17:09:19 2015<br class="">@@ -10,7 +10,7 @@<br class=""> #include "lldb/DataFormatters/CoreMedia.h"<br class=""><br class=""> #include "lldb/Core/Flags.h"<br class="">-#include "lldb/Symbol/ClangASTContext.h"<br class="">+#include "lldb/Symbol/TypeSystem.h"<br class=""> #include "lldb/Target/Target.h"<br class=""> #include <inttypes.h><br class=""><br class="">@@ -25,13 +25,13 @@ lldb_private::formatters::CMTimeSummaryP<br class="">     if (!type.IsValid())<br class="">         return false;<br class=""><br class="">-    ClangASTContext *ast_ctx = valobj.GetExecutionContextRef().GetTargetSP()->GetScratchClangASTContext();<br class="">-    if (!ast_ctx)<br class="">+    TypeSystem *type_system = valobj.GetExecutionContextRef().GetTargetSP()->GetTypeSystemForLanguage(lldb::eLanguageTypeC);<br class="">+    if (!type_system)<br class="">         return false;<br class=""><br class="">     // fetch children by offset to compensate for potential lack of debug info<br class="">-    auto int64_ty = ast_ctx->GetIntTypeFromBitSize(64, true);<br class="">-    auto int32_ty = ast_ctx->GetIntTypeFromBitSize(32, true);<br class="">+    auto int64_ty = type_system->GetIntTypeFromBitSize(64, true);<br class="">+    auto int32_ty = type_system->GetIntTypeFromBitSize(32, true);<br class=""><br class="">     auto value_sp(valobj.GetSyntheticChildAtOffset(0, int64_ty, true));<br class="">     auto timescale_sp(valobj.GetSyntheticChildAtOffset(8, int32_ty, true));<br class=""><br class="">Modified: lldb/trunk/source/DataFormatters/VectorType.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/VectorType.cpp?rev=247082&r1=247081&r2=247082&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/VectorType.cpp?rev=247082&r1=247081&r2=247082&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/source/DataFormatters/VectorType.cpp (original)<br class="">+++ lldb/trunk/source/DataFormatters/VectorType.cpp Tue Sep  8 17:09:19 2015<br class="">@@ -11,8 +11,8 @@<br class=""><br class=""> #include "lldb/Core/ValueObject.h"<br class=""> #include "lldb/DataFormatters/FormattersHelpers.h"<br class="">-#include "lldb/Symbol/ClangASTContext.h"<br class=""> #include "lldb/Symbol/CompilerType.h"<br class="">+#include "lldb/Symbol/TypeSystem.h"<br class=""><br class=""> #include "lldb/Utility/LLDBAssert.h"<br class=""><br class="">@@ -22,85 +22,85 @@ using namespace lldb_private::formatters<br class=""><br class=""> static CompilerType<br class=""> GetCompilerTypeForFormat (lldb::Format format,<br class="">-                       CompilerType element_type,<br class="">-                       ClangASTContext *ast_ctx)<br class="">+                          CompilerType element_type,<br class="">+                          TypeSystem *type_system)<br class=""> {<br class="">-    lldbassert(ast_ctx && "ast_ctx needs to be not NULL");<br class="">+    lldbassert(type_system && "type_system needs to be not NULL");<br class=""><br class="">     switch (format)<br class="">     {<br class="">         case lldb::eFormatAddressInfo:<br class="">         case lldb::eFormatPointer:<br class="">-            return ast_ctx->GetPointerSizedIntType(false);<br class="">+            return type_system->GetIntTypeFromBitSize(8*type_system->GetPointerByteSize(), false);<br class=""><br class="">         case lldb::eFormatBoolean:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeBool);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeBool);<br class=""><br class="">         case lldb::eFormatBytes:<br class="">         case lldb::eFormatBytesWithASCII:<br class="">         case lldb::eFormatChar:<br class="">         case lldb::eFormatCharArray:<br class="">         case lldb::eFormatCharPrintable:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeChar);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeChar);<br class=""><br class="">         case lldb::eFormatComplex /* lldb::eFormatComplexFloat */:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeFloatComplex);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeFloatComplex);<br class=""><br class="">         case lldb::eFormatCString:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeChar).GetPointerType();<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeChar).GetPointerType();<br class=""><br class="">         case lldb::eFormatFloat:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeFloat);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeFloat);<br class=""><br class="">         case lldb::eFormatHex:<br class="">         case lldb::eFormatHexUppercase:<br class="">         case lldb::eFormatOctal:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeInt);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeInt);<br class=""><br class="">         case lldb::eFormatHexFloat:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeFloat);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeFloat);<br class=""><br class="">         case lldb::eFormatUnicode16:<br class="">         case lldb::eFormatUnicode32:<br class=""><br class="">         case lldb::eFormatUnsigned:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeUnsignedInt);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeUnsignedInt);<br class=""><br class="">         case lldb::eFormatVectorOfChar:<br class="">-            return ast_ctx->GetBasicType(lldb::eBasicTypeChar);<br class="">+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeChar);<br class=""><br class="">         case lldb::eFormatVectorOfFloat32:<br class="">-            return ast_ctx->GetFloatTypeFromBitSize(32);<br class="">+            return type_system->GetFloatTypeFromBitSize(32);<br class=""><br class="">         case lldb::eFormatVectorOfFloat64:<br class="">-            return ast_ctx->GetFloatTypeFromBitSize(64);<br class="">+            return type_system->GetFloatTypeFromBitSize(64);<br class=""><br class="">         case lldb::eFormatVectorOfSInt16:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(16, true);<br class="">+            return type_system->GetIntTypeFromBitSize(16, true);<br class=""><br class="">         case lldb::eFormatVectorOfSInt32:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(32, true);<br class="">+            return type_system->GetIntTypeFromBitSize(32, true);<br class=""><br class="">         case lldb::eFormatVectorOfSInt64:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(64, true);<br class="">+            return type_system->GetIntTypeFromBitSize(64, true);<br class=""><br class="">         case lldb::eFormatVectorOfSInt8:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(8, true);<br class="">+            return type_system->GetIntTypeFromBitSize(8, true);<br class=""><br class="">         case lldb::eFormatVectorOfUInt128:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(128, false);<br class="">+            return type_system->GetIntTypeFromBitSize(128, false);<br class=""><br class="">         case lldb::eFormatVectorOfUInt16:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(16, false);<br class="">+            return type_system->GetIntTypeFromBitSize(16, false);<br class=""><br class="">         case lldb::eFormatVectorOfUInt32:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(32, false);<br class="">+            return type_system->GetIntTypeFromBitSize(32, false);<br class=""><br class="">         case lldb::eFormatVectorOfUInt64:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(64, false);<br class="">+            return type_system->GetIntTypeFromBitSize(64, false);<br class=""><br class="">         case lldb::eFormatVectorOfUInt8:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(8, false);<br class="">+            return type_system->GetIntTypeFromBitSize(8, false);<br class=""><br class="">         case lldb::eFormatDefault:<br class="">             return element_type;<br class="">@@ -113,7 +113,7 @@ GetCompilerTypeForFormat (lldb::Format f<br class="">         case lldb::eFormatOSType:<br class="">         case lldb::eFormatVoid:<br class="">         default:<br class="">-            return ast_ctx->GetIntTypeFromBitSize(8, false);<br class="">+            return type_system->GetIntTypeFromBitSize(8, false);<br class="">     }<br class=""> }<br class=""><br class="">@@ -232,7 +232,10 @@ namespace lldb_private {<br class="">                 CompilerType parent_type(m_backend.GetCompilerType());<br class="">                 CompilerType element_type;<br class="">                 parent_type.IsVectorType(&element_type, nullptr);<br class="">-                m_child_type = ::GetCompilerTypeForFormat(m_parent_format, element_type, llvm::dyn_cast_or_null<ClangASTContext>(parent_type.GetTypeSystem()));<br class="">+                TargetSP target_sp(m_backend.GetTargetSP());<br class="">+                m_child_type = ::GetCompilerTypeForFormat(m_parent_format,<br class="">+                                                          element_type,<br class="">+                                                          target_sp ? target_sp->GetTypeSystemForLanguage(lldb::eLanguageTypeC) : nullptr);<br class="">                 m_num_children = ::CalculateNumChildren(parent_type,<br class="">                                                         m_child_type);<br class="">                 m_item_format = GetItemFormatForFormat(m_parent_format,<br class=""><br class="">Modified: lldb/trunk/source/Target/Target.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=247082&r1=247081&r2=247082&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=247082&r1=247081&r2=247082&view=diff</a><br class="">==============================================================================<br class="">--- lldb/trunk/source/Target/Target.cpp (original)<br class="">+++ lldb/trunk/source/Target/Target.cpp Tue Sep  8 17:09:19 2015<br class="">@@ -1906,6 +1906,27 @@ Target::GetScratchClangASTContext(bool c<br class="">     return m_scratch_ast_context_ap.get();<br class=""> }<br class=""><br class="">+TypeSystem*<br class="">+Target::GetTypeSystemForLanguage (lldb::LanguageType language)<br class="">+{<br class="">+    switch (language)<br class="">+    {<br class="">+        case lldb::eLanguageTypeC:<br class="">+        case lldb::eLanguageTypeC11:<br class="">+        case lldb::eLanguageTypeC89:<br class="">+        case lldb::eLanguageTypeC99:<br class="">+        case lldb::eLanguageTypeC_plus_plus:<br class="">+        case lldb::eLanguageTypeC_plus_plus_03:<br class="">+        case lldb::eLanguageTypeC_plus_plus_11:<br class="">+        case lldb::eLanguageTypeC_plus_plus_14:<br class="">+        case lldb::eLanguageTypeObjC:<br class="">+        case lldb::eLanguageTypeObjC_plus_plus:<br class="">+            return GetScratchClangASTContext(true);<br class="">+        default:<br class="">+            return nullptr;<br class="">+    }<br class="">+}<br class="">+<br class=""> ClangASTImporter *<br class=""> Target::GetClangASTImporter()<br class=""> {<br class=""><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" target="_blank" class="">lldb-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a></blockquote></div></blockquote></div><br class=""><div class="">
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">Thanks,</div><div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><i class="">- Enrico</i><br class="">📩 egranata@<font color="#ff2600" class=""></font>.com ☎️ 27683</div>
</div>
<br class=""></body></html>