mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-16 05:10:32 +00:00

Summary: We assume in LLDB that every type comes from an ASTContext with an associated ClangASTContext. However the types inside the ClangModuleDeclVendor don't have a ClangASTContext so we end up crashing whenever we create a CompilerType for one of these types. Simplest way to trigger this bug is to just look up NSObject from a module: (lldb) expr @import Foundation (lldb) type lookup NSObject Assertion failed: (m_type_system != nullptr), function CompilerType, file /Users/teemperor/llvm1/llvm-project/lldb/source/Symbol/CompilerType.cpp, line 39. This patch just creates a ClangASTContext for the ASTContext used by ClangModuleDeclVendor. Reviewers: davide, shafik Reviewed By: davide Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64989 llvm-svn: 366653