<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 9, 2015 at 2:57 PM Enrico Granata <<a href="mailto:egranata@apple.com">egranata@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Sep 9, 2015, at 2:47 PM, Ryan Brown <<a href="mailto:ribrdb@google.com" target="_blank">ribrdb@google.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>On Tue, Sep 8, 2015 at 3:10 PM Enrico Granata via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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>Date: Tue Sep  8 17:09:19 2015<br>New Revision: 247082<br><br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project?rev=247082&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=247082&view=rev</a><br>Log:<br>Implement a Target::GetTypeSystemForLanguage API, as well as provide helpers on the TypeSystem to get numeric types of specific sizes and signedness<br><br>Modified:<br>   <span> </span>lldb/trunk/include/lldb/Symbol/ClangASTContext.h<br>   <span> </span>lldb/trunk/include/lldb/Symbol/TypeSystem.h<br>   <span> </span>lldb/trunk/include/lldb/Target/Target.h<br>   <span> </span>lldb/trunk/source/DataFormatters/CoreMedia.cpp<br>   <span> </span>lldb/trunk/source/DataFormatters/VectorType.cpp<br>   <span> </span>lldb/trunk/source/Target/Target.cpp<br><br>Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h<br>URL:<span> </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">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=247082&r1=247081&r2=247082&view=diff</a><br>==============================================================================<br>--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)<br>+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Tue Sep  8 17:09:19 2015<br>@@ -454,7 +454,7 @@ public:<br>     //------------------------------------------------------------------<br><br>     CompilerType<br>-    GetIntTypeFromBitSize (size_t bit_size, bool is_signed)<br>+    GetIntTypeFromBitSize (size_t bit_size, bool is_signed) override<br>     {<br>         return GetIntTypeFromBitSize (getASTContext(), bit_size, is_signed);<br>     }<br>@@ -477,7 +477,7 @@ public:<br>     //------------------------------------------------------------------<br><br>     CompilerType<br>-    GetFloatTypeFromBitSize (size_t bit_size)<br>+    GetFloatTypeFromBitSize (size_t bit_size) override<br>     {<br>         return GetFloatTypeFromBitSize (getASTContext(), bit_size);<br>     }<br><br>Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h<br>URL:<span> </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">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=247082&r1=247081&r2=247082&view=diff</a><br>==============================================================================<br>--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)<br>+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Tue Sep  8 17:09:19 2015<br>@@ -400,6 +400,12 @@ public:<br>     virtual CompilerType<br>     GetBasicTypeFromAST (lldb::BasicType basic_type) = 0;<br><br>+    virtual CompilerType<br>+    GetIntTypeFromBitSize (size_t bit_size, bool is_signed) = 0;<br>+<br>+    virtual CompilerType<br>+    GetFloatTypeFromBitSize (size_t bit_size) = 0;<br>+<br></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Why do these need to be here?</div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><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></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> It seems like everything using these is clang specific.</div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><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></div></div></blockquote><div><br></div><div>I ask because I'm trying to add another TypeSystem.</div><div>I could implement these, but I don't really like adding functionality that  isn't used and that I don't really have any way to test.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><blockquote type="cite"><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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>     IsBeingDefined (void *type) = 0;<br><br><br>Modified: lldb/trunk/include/lldb/Target/Target.h<br>URL:<span> </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">http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=247082&r1=247081&r2=247082&view=diff</a><br>==============================================================================<br>--- lldb/trunk/include/lldb/Target/Target.h (original)<br>+++ lldb/trunk/include/lldb/Target/Target.h Tue Sep  8 17:09:19 2015<br>@@ -1230,6 +1230,14 @@ public:<br>     ClangASTContext *<br>     GetScratchClangASTContext(bool create_on_demand=true);<br><br>+    TypeSystem*<br>+    GetTypeSystemForLanguage (lldb::LanguageType language);<br>+<br>+    CompilerType<br>+    GetBasicType (lldb::LanguageType language,<br>+                  lldb::BasicType basic_type,<br>+                  size_t size = 0);<br>+<br></blockquote></blockquote><div><br></div></div><div style="word-wrap:break-word"><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></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Again, I'm not sure why this needs to be here when all uses are clang specific.</div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><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" target="_blank">llvm.org</a> LLDB is integrated with</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">If it needs to be here, can you add some documentation?</div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>Sure thing. Do you have any suggestions as to how to phrase it?</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">When writing a new TypeSystem, does it need to be added to GetTypeSystemForLanguage?</div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>Seems about right</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">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></div></div></div><div style="word-wrap:break-word"><div><div>Define “interact"</div></div></div></blockquote><div>Well for example in VectorType you use a CompilerType from the "scratch" type system with a ValueObject that might be using another type system. That seems strange to me.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">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></div></div></div><div style="word-wrap:break-word"><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></div></div></blockquote><div><br></div><div>It's not really moot because I need to know how to implement GetBasicType for the TypeSytem I return from Target::GetTypeSystemForLanguage(eLanguageTypeGo).</div><div>I guess I'm wondering what the contract is for the TypeSystem I return.</div><div>If only the GetXTypeFromBitSize methods are called things should work fine. But if someone calls GetBasicType(eBasicTypeInt), I can only guess what the compiler chose.</div><div><br></div><div>It seems like everything currently using GetScratchClangASTContext is inside language specific data formatters or runtimes, and I'm having a hard time imaging a use case that isn't language specific.</div>















<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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>     GetClangASTImporter();<br><br><br>Modified: lldb/trunk/source/DataFormatters/CoreMedia.cpp<br>URL:<span> </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">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CoreMedia.cpp?rev=247082&r1=247081&r2=247082&view=diff</a><br>==============================================================================<br>--- lldb/trunk/source/DataFormatters/CoreMedia.cpp (original)<br>+++ lldb/trunk/source/DataFormatters/CoreMedia.cpp Tue Sep  8 17:09:19 2015<br>@@ -10,7 +10,7 @@<br> #include "lldb/DataFormatters/CoreMedia.h"<br><br> #include "lldb/Core/Flags.h"<br>-#include "lldb/Symbol/ClangASTContext.h"<br>+#include "lldb/Symbol/TypeSystem.h"<br> #include "lldb/Target/Target.h"<br> #include <inttypes.h><br><br>@@ -25,13 +25,13 @@ lldb_private::formatters::CMTimeSummaryP<br>     if (!type.IsValid())<br>         return false;<br><br>-    ClangASTContext *ast_ctx = valobj.GetExecutionContextRef().GetTargetSP()->GetScratchClangASTContext();<br>-    if (!ast_ctx)<br>+    TypeSystem *type_system = valobj.GetExecutionContextRef().GetTargetSP()->GetTypeSystemForLanguage(lldb::eLanguageTypeC);<br>+    if (!type_system)<br>         return false;<br><br>     // fetch children by offset to compensate for potential lack of debug info<br>-    auto int64_ty = ast_ctx->GetIntTypeFromBitSize(64, true);<br>-    auto int32_ty = ast_ctx->GetIntTypeFromBitSize(32, true);<br>+    auto int64_ty = type_system->GetIntTypeFromBitSize(64, true);<br>+    auto int32_ty = type_system->GetIntTypeFromBitSize(32, true);<br><br>     auto value_sp(valobj.GetSyntheticChildAtOffset(0, int64_ty, true));<br>     auto timescale_sp(valobj.GetSyntheticChildAtOffset(8, int32_ty, true));<br><br>Modified: lldb/trunk/source/DataFormatters/VectorType.cpp<br>URL:<span> </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">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/VectorType.cpp?rev=247082&r1=247081&r2=247082&view=diff</a><br>==============================================================================<br>--- lldb/trunk/source/DataFormatters/VectorType.cpp (original)<br>+++ lldb/trunk/source/DataFormatters/VectorType.cpp Tue Sep  8 17:09:19 2015<br>@@ -11,8 +11,8 @@<br><br> #include "lldb/Core/ValueObject.h"<br> #include "lldb/DataFormatters/FormattersHelpers.h"<br>-#include "lldb/Symbol/ClangASTContext.h"<br> #include "lldb/Symbol/CompilerType.h"<br>+#include "lldb/Symbol/TypeSystem.h"<br><br> #include "lldb/Utility/LLDBAssert.h"<br><br>@@ -22,85 +22,85 @@ using namespace lldb_private::formatters<br><br> static CompilerType<br> GetCompilerTypeForFormat (lldb::Format format,<br>-                       CompilerType element_type,<br>-                       ClangASTContext *ast_ctx)<br>+                          CompilerType element_type,<br>+                          TypeSystem *type_system)<br> {<br>-    lldbassert(ast_ctx && "ast_ctx needs to be not NULL");<br>+    lldbassert(type_system && "type_system needs to be not NULL");<br><br>     switch (format)<br>     {<br>         case lldb::eFormatAddressInfo:<br>         case lldb::eFormatPointer:<br>-            return ast_ctx->GetPointerSizedIntType(false);<br>+            return type_system->GetIntTypeFromBitSize(8*type_system->GetPointerByteSize(), false);<br><br>         case lldb::eFormatBoolean:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeBool);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeBool);<br><br>         case lldb::eFormatBytes:<br>         case lldb::eFormatBytesWithASCII:<br>         case lldb::eFormatChar:<br>         case lldb::eFormatCharArray:<br>         case lldb::eFormatCharPrintable:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeChar);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeChar);<br><br>         case lldb::eFormatComplex /* lldb::eFormatComplexFloat */:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeFloatComplex);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeFloatComplex);<br><br>         case lldb::eFormatCString:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeChar).GetPointerType();<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeChar).GetPointerType();<br><br>         case lldb::eFormatFloat:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeFloat);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeFloat);<br><br>         case lldb::eFormatHex:<br>         case lldb::eFormatHexUppercase:<br>         case lldb::eFormatOctal:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeInt);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeInt);<br><br>         case lldb::eFormatHexFloat:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeFloat);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeFloat);<br><br>         case lldb::eFormatUnicode16:<br>         case lldb::eFormatUnicode32:<br><br>         case lldb::eFormatUnsigned:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeUnsignedInt);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeUnsignedInt);<br><br>         case lldb::eFormatVectorOfChar:<br>-            return ast_ctx->GetBasicType(lldb::eBasicTypeChar);<br>+            return type_system->GetBasicTypeFromAST(lldb::eBasicTypeChar);<br><br>         case lldb::eFormatVectorOfFloat32:<br>-            return ast_ctx->GetFloatTypeFromBitSize(32);<br>+            return type_system->GetFloatTypeFromBitSize(32);<br><br>         case lldb::eFormatVectorOfFloat64:<br>-            return ast_ctx->GetFloatTypeFromBitSize(64);<br>+            return type_system->GetFloatTypeFromBitSize(64);<br><br>         case lldb::eFormatVectorOfSInt16:<br>-            return ast_ctx->GetIntTypeFromBitSize(16, true);<br>+            return type_system->GetIntTypeFromBitSize(16, true);<br><br>         case lldb::eFormatVectorOfSInt32:<br>-            return ast_ctx->GetIntTypeFromBitSize(32, true);<br>+            return type_system->GetIntTypeFromBitSize(32, true);<br><br>         case lldb::eFormatVectorOfSInt64:<br>-            return ast_ctx->GetIntTypeFromBitSize(64, true);<br>+            return type_system->GetIntTypeFromBitSize(64, true);<br><br>         case lldb::eFormatVectorOfSInt8:<br>-            return ast_ctx->GetIntTypeFromBitSize(8, true);<br>+            return type_system->GetIntTypeFromBitSize(8, true);<br><br>         case lldb::eFormatVectorOfUInt128:<br>-            return ast_ctx->GetIntTypeFromBitSize(128, false);<br>+            return type_system->GetIntTypeFromBitSize(128, false);<br><br>         case lldb::eFormatVectorOfUInt16:<br>-            return ast_ctx->GetIntTypeFromBitSize(16, false);<br>+            return type_system->GetIntTypeFromBitSize(16, false);<br><br>         case lldb::eFormatVectorOfUInt32:<br>-            return ast_ctx->GetIntTypeFromBitSize(32, false);<br>+            return type_system->GetIntTypeFromBitSize(32, false);<br><br>         case lldb::eFormatVectorOfUInt64:<br>-            return ast_ctx->GetIntTypeFromBitSize(64, false);<br>+            return type_system->GetIntTypeFromBitSize(64, false);<br><br>         case lldb::eFormatVectorOfUInt8:<br>-            return ast_ctx->GetIntTypeFromBitSize(8, false);<br>+            return type_system->GetIntTypeFromBitSize(8, false);<br><br>         case lldb::eFormatDefault:<br>             return element_type;<br>@@ -113,7 +113,7 @@ GetCompilerTypeForFormat (lldb::Format f<br>         case lldb::eFormatOSType:<br>         case lldb::eFormatVoid:<br>         default:<br>-            return ast_ctx->GetIntTypeFromBitSize(8, false);<br>+            return type_system->GetIntTypeFromBitSize(8, false);<br>     }<br> }<br><br>@@ -232,7 +232,10 @@ namespace lldb_private {<br>                 CompilerType parent_type(m_backend.GetCompilerType());<br>                 CompilerType element_type;<br>                 parent_type.IsVectorType(&element_type, nullptr);<br>-                m_child_type = ::GetCompilerTypeForFormat(m_parent_format, element_type, llvm::dyn_cast_or_null<ClangASTContext>(parent_type.GetTypeSystem()));<br>+                TargetSP target_sp(m_backend.GetTargetSP());<br>+                m_child_type = ::GetCompilerTypeForFormat(m_parent_format,<br>+                                                          element_type,<br>+                                                          target_sp ? target_sp->GetTypeSystemForLanguage(lldb::eLanguageTypeC) : nullptr);<br>                 m_num_children = ::CalculateNumChildren(parent_type,<br>                                                         m_child_type);<br>                 m_item_format = GetItemFormatForFormat(m_parent_format,<br><br>Modified: lldb/trunk/source/Target/Target.cpp<br>URL:<span> </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">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=247082&r1=247081&r2=247082&view=diff</a><br>==============================================================================<br>--- lldb/trunk/source/Target/Target.cpp (original)<br>+++ lldb/trunk/source/Target/Target.cpp Tue Sep  8 17:09:19 2015<br>@@ -1906,6 +1906,27 @@ Target::GetScratchClangASTContext(bool c<br>     return m_scratch_ast_context_ap.get();<br> }<br><br>+TypeSystem*<br>+Target::GetTypeSystemForLanguage (lldb::LanguageType language)<br>+{<br>+    switch (language)<br>+    {<br>+        case lldb::eLanguageTypeC:<br>+        case lldb::eLanguageTypeC11:<br>+        case lldb::eLanguageTypeC89:<br>+        case lldb::eLanguageTypeC99:<br>+        case lldb::eLanguageTypeC_plus_plus:<br>+        case lldb::eLanguageTypeC_plus_plus_03:<br>+        case lldb::eLanguageTypeC_plus_plus_11:<br>+        case lldb::eLanguageTypeC_plus_plus_14:<br>+        case lldb::eLanguageTypeObjC:<br>+        case lldb::eLanguageTypeObjC_plus_plus:<br>+            return GetScratchClangASTContext(true);<br>+        default:<br>+            return nullptr;<br>+    }<br>+}<br>+<br> ClangASTImporter *<br> Target::GetClangASTImporter()<br> {<br><br><br>_______________________________________________<br>lldb-commits mailing list<br><a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a></blockquote></div></blockquote></div></div><div style="word-wrap:break-word"><div></div><br><div>
<div 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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>Thanks,</div><div 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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><i>- Enrico</i><br>📩 egranata@<font color="#ff2600"></font>.com ☎️ 27683</div>
</div>
<br></div></blockquote></div></div>