summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Value.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-08-24 23:46:31 +0000
committerGreg Clayton <gclayton@apple.com>2015-08-24 23:46:31 +0000
commit99558cc424fee346a4070b42ac9c62546d499333 (patch)
tree3057c0119872e7d5ab68b4571f99ea64eaad1378 /lldb/source/Core/Value.cpp
parent774b5e296ff49ef15809182440715959f8db674b (diff)
downloadbcm5719-llvm-99558cc424fee346a4070b42ac9c62546d499333.tar.gz
bcm5719-llvm-99558cc424fee346a4070b42ac9c62546d499333.zip
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. llvm-svn: 245905
Diffstat (limited to 'lldb/source/Core/Value.cpp')
-rw-r--r--lldb/source/Core/Value.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index 0b2bb4899d7..01d7927dce5 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -275,7 +275,7 @@ Value::GetValueByteSize (Error *error_ptr)
case eContextTypeLLDBType: // Type *
case eContextTypeVariable: // Variable *
{
- const CompilerType &ast_type = GetClangType();
+ const CompilerType &ast_type = GetCompilerType();
if (ast_type.IsValid())
byte_size = ast_type.GetByteSize(nullptr);
}
@@ -298,7 +298,7 @@ Value::GetValueByteSize (Error *error_ptr)
}
const CompilerType &
-Value::GetClangType ()
+Value::GetCompilerType ()
{
if (!m_clang_type.IsValid())
{
@@ -314,7 +314,7 @@ Value::GetClangType ()
{
Type *lldb_type = GetType();
if (lldb_type)
- m_clang_type = lldb_type->GetClangForwardType();
+ m_clang_type = lldb_type->GetForwardCompilerType ();
}
break;
@@ -325,7 +325,7 @@ Value::GetClangType ()
{
Type *variable_type = variable->GetType();
if (variable_type)
- m_clang_type = variable_type->GetClangForwardType();
+ m_clang_type = variable_type->GetForwardCompilerType ();
}
}
break;
@@ -336,7 +336,7 @@ Value::GetClangType ()
}
void
-Value::SetClangType (const CompilerType &clang_type)
+Value::SetCompilerType (const CompilerType &clang_type)
{
m_clang_type = clang_type;
}
@@ -355,7 +355,7 @@ Value::GetValueDefaultFormat ()
case eContextTypeLLDBType:
case eContextTypeVariable:
{
- const CompilerType &ast_type = GetClangType();
+ const CompilerType &ast_type = GetCompilerType();
if (ast_type.IsValid())
return ast_type.GetFormat();
}
@@ -407,7 +407,7 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
lldb::addr_t address = LLDB_INVALID_ADDRESS;
AddressType address_type = eAddressTypeFile;
Address file_so_addr;
- const CompilerType &ast_type = GetClangType();
+ const CompilerType &ast_type = GetCompilerType();
switch (m_value_type)
{
case eValueTypeVector:
@@ -721,7 +721,7 @@ Value::GetValueAsData (ExecutionContext *exe_ctx,
Scalar &
Value::ResolveValue(ExecutionContext *exe_ctx)
{
- const CompilerType &clang_type = GetClangType();
+ const CompilerType &clang_type = GetCompilerType();
if (clang_type.IsValid())
{
switch (m_value_type)
OpenPOWER on IntegriCloud