Now that CompilerType uses a "TypeSystem *" and a "void *" instead of a "clang::ASTContext *" and a "void *", we need to know if anyone is trying to create a CompilerType from a clang::ASTContext that has no backing ClangASTContext.

This assert will fire if this is the case and we will need to fix the offending code.

llvm-svn: 247196
This commit is contained in:
Greg Clayton 2015-09-09 22:13:01 +00:00
parent a4846c8524
commit 34e2180a00
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,10 @@ CompilerType::CompilerType (clang::ASTContext *ast,
m_type (qual_type.getAsOpaquePtr()),
m_type_system (ClangASTContext::GetASTContext(ast))
{
#ifdef LLDB_CONFIGURATION_DEBUG
if (m_type)
assert(m_type_system != nullptr);
#endif
}
CompilerType::~CompilerType()