diff options
Diffstat (limited to 'lldb/source/DataFormatters/NSIndexPath.cpp')
| -rw-r--r-- | lldb/source/DataFormatters/NSIndexPath.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/DataFormatters/NSIndexPath.cpp b/lldb/source/DataFormatters/NSIndexPath.cpp index a09cbcc3476..6f2a7c4bc1e 100644 --- a/lldb/source/DataFormatters/NSIndexPath.cpp +++ b/lldb/source/DataFormatters/NSIndexPath.cpp @@ -27,7 +27,6 @@ public: NSIndexPathSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd (*valobj_sp.get()), m_ptr_size(0), - m_ast_ctx(nullptr), m_uint_star_type() { m_ptr_size = m_backend.GetTargetSP()->GetArchitecture().GetAddressByteSize(); @@ -53,11 +52,12 @@ public: TypeSystem* type_system = m_backend.GetCompilerType().GetTypeSystem(); if (!type_system) return false; - m_ast_ctx = type_system->AsClangASTContext(); - if (!m_ast_ctx) + + ClangASTContext *ast = m_backend.GetExecutionContextRef().GetTargetSP()->GetScratchClangASTContext(); + if (!ast) return false; - - m_uint_star_type = m_ast_ctx->GetPointerSizedIntType(false); + + m_uint_star_type = ast->GetPointerSizedIntType(false); static ConstString g__indexes("_indexes"); static ConstString g__length("_length"); @@ -325,7 +325,6 @@ protected: } m_impl; uint32_t m_ptr_size; - ClangASTContext* m_ast_ctx; CompilerType m_uint_star_type; }; |

