Final bit of type system cleanup that abstracts declaration contexts into…


Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions.

Create a new "lldb_private::CompilerDeclContext" class that will replace all direct uses of "clang::DeclContext" when used in compiler agnostic code, yet still allow for conversion to clang::DeclContext subclasses by clang specific code. This completes the abstraction of type parsing by removing all "clang::" references from the SymbolFileDWARF. The new "lldb_private::CompilerDeclContext" class abstracts decl contexts found in compiler type systems so they can be used in internal API calls. The TypeSystem is required to support CompilerDeclContexts with new pure virtual functions that start with "DeclContext" in the member function names. Converted all code that used lldb_private::ClangNamespaceDecl over to use the new CompilerDeclContext class and removed the ClangNamespaceDecl.cpp and ClangNamespaceDecl.h files.

Removed direct use of clang APIs from SBType and now use the abstract type systems to correctly explore types.

Bulk renames for things that used to return a ClangASTType which is now CompilerType:

"Type::GetClangFullType()" to "Type::GetFullCompilerType()"
"Type::GetClangLayoutType()" to "Type::GetLayoutCompilerType()"
"Type::GetClangForwardType()" to "Type::GetForwardCompilerType()"
"Value::GetClangType()" to "Value::GetCompilerType()"
"Value::SetClangType (const CompilerType &)" to "Value::SetCompilerType (const CompilerType &)"
"ValueObject::GetClangType ()" to "ValueObject::GetCompilerType()"
many more renames that are similar.


gclaytonAug 24 2015, 4:46 PM
rL245904: [ARM NEON] Replace redundant code with a new GetFloatNeonType. NFC.

Event Timeline

Hi Greg,

This CL caused a test regression in TestSourceManager on all platforms. I submitted a fix as rL245928, but please check it out to make sure that one is the right fix.


Hi Greg,

This change introduced a regression in expression evaluation. When I try to evaluate any expression in some specific context then lldb prints out the following error:

error: out-of-line definition of '$__lldb_expr' does not match any declaration in 'Foo'
error: 1 errors parsing expression

I created a test case stub for reproducing the issue what fails on Linux x86_64, but passes on OSX. The test is available here: D12934 (I plan to make it nicer after we know what we actually have to test).

Do you have any idea about what can cause this issue?