summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime
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/Plugins/LanguageRuntime
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/Plugins/LanguageRuntime')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp8
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp10
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp14
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp6
4 files changed, 19 insertions, 19 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 908a53c935f..375b9bb3894 100644
--- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -40,7 +40,7 @@ ItaniumABILanguageRuntime::CouldHaveDynamicValue (ValueObject &in_value)
{
const bool check_cxx = true;
const bool check_objc = false;
- return in_value.GetClangType().IsPossibleDynamicType (NULL, check_cxx, check_objc);
+ return in_value.GetCompilerType().IsPossibleDynamicType (NULL, check_cxx, check_objc);
}
bool
@@ -189,7 +189,7 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
type_sp = class_types.GetTypeAtIndex(i);
if (type_sp)
{
- if (ClangASTContext::IsCXXClassType(type_sp->GetClangFullType()))
+ if (ClangASTContext::IsCXXClassType(type_sp->GetFullCompilerType ()))
{
if (log)
log->Printf ("0x%16.16" PRIx64 ": static-type = '%s' has multiple matching dynamic types, picking this one: uid={0x%" PRIx64 "}, type-name='%s'\n",
@@ -221,8 +221,8 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value,
// the value we were handed.
if (type_sp)
{
- if (ClangASTContext::AreTypesSame (in_value.GetClangType(),
- type_sp->GetClangFullType()))
+ if (ClangASTContext::AreTypesSame (in_value.GetCompilerType(),
+ type_sp->GetFullCompilerType ()))
{
// The dynamic type we found was the same type,
// so we don't have a dynamic type here...
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index f05f885d4f0..81ae61841ae 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -51,7 +51,7 @@ AppleObjCRuntime::AppleObjCRuntime(Process *process) :
bool
AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &valobj)
{
- CompilerType clang_type(valobj.GetClangType());
+ CompilerType clang_type(valobj.GetCompilerType());
bool is_signed;
// ObjC objects can only be pointers (or numbers that actually represents pointers
// but haven't been typecast, because reasons..)
@@ -89,7 +89,7 @@ AppleObjCRuntime::GetObjectDescription (Stream &strm, Value &value, ExecutionCon
return false;
Target *target = exe_ctx.GetTargetPtr();
- CompilerType clang_type = value.GetClangType();
+ CompilerType clang_type = value.GetCompilerType();
if (clang_type)
{
if (!ClangASTContext::IsObjCObjectPointerType(clang_type))
@@ -106,7 +106,7 @@ AppleObjCRuntime::GetObjectDescription (Stream &strm, Value &value, ExecutionCon
if (!opaque_type)
opaque_type = ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
//value.SetContext(Value::eContextTypeClangType, opaque_type_ptr);
- value.SetClangType (opaque_type);
+ value.SetCompilerType (opaque_type);
}
ValueList arg_value_list;
@@ -118,7 +118,7 @@ AppleObjCRuntime::GetObjectDescription (Stream &strm, Value &value, ExecutionCon
CompilerType return_clang_type = ast_context->GetCStringType(true);
Value ret;
// ret.SetContext(Value::eContextTypeClangType, return_clang_type);
- ret.SetClangType (return_clang_type);
+ ret.SetCompilerType (return_clang_type);
if (exe_ctx.GetFramePtr() == NULL)
{
@@ -229,7 +229,7 @@ AppleObjCRuntime::GetPrintForDebuggerAddr()
bool
AppleObjCRuntime::CouldHaveDynamicValue (ValueObject &in_value)
{
- return in_value.GetClangType().IsPossibleDynamicType (NULL,
+ return in_value.GetCompilerType().IsPossibleDynamicType (NULL,
false, // do not check C++
true); // check ObjC
}
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 5d4ba3acacd..4817d57a353 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1139,7 +1139,7 @@ AppleObjCRuntimeV2::GetClassDescriptor (ValueObject& valobj)
// if we get an invalid VO (which might still happen when playing around
// with pointers returned by the expression parser, don't consider this
// a valid ObjC object)
- if (valobj.GetClangType().IsValid())
+ if (valobj.GetCompilerType().IsValid())
{
addr_t isa_pointer = valobj.GetPointerValue();
@@ -1276,13 +1276,13 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(RemoteNXMapTable &hash_table
Value value;
value.SetValueType (Value::eValueTypeScalar);
// value.SetContext (Value::eContextTypeClangType, clang_void_pointer_type);
- value.SetClangType (clang_void_pointer_type);
+ value.SetCompilerType (clang_void_pointer_type);
arguments.PushValue (value);
arguments.PushValue (value);
value.SetValueType (Value::eValueTypeScalar);
// value.SetContext (Value::eContextTypeClangType, clang_uint32_t_type);
- value.SetClangType (clang_uint32_t_type);
+ value.SetCompilerType (clang_uint32_t_type);
arguments.PushValue (value);
m_get_class_info_function.reset(new ClangFunction (*m_process,
@@ -1355,7 +1355,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(RemoteNXMapTable &hash_table
Value return_value;
return_value.SetValueType (Value::eValueTypeScalar);
//return_value.SetContext (Value::eContextTypeClangType, clang_uint32_t_type);
- return_value.SetClangType (clang_uint32_t_type);
+ return_value.SetCompilerType (clang_uint32_t_type);
return_value.GetScalar() = 0;
errors.Clear();
@@ -1530,13 +1530,13 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
Value value;
value.SetValueType (Value::eValueTypeScalar);
//value.SetContext (Value::eContextTypeClangType, clang_void_pointer_type);
- value.SetClangType (clang_void_pointer_type);
+ value.SetCompilerType (clang_void_pointer_type);
arguments.PushValue (value);
arguments.PushValue (value);
value.SetValueType (Value::eValueTypeScalar);
//value.SetContext (Value::eContextTypeClangType, clang_uint32_t_type);
- value.SetClangType (clang_uint32_t_type);
+ value.SetCompilerType (clang_uint32_t_type);
arguments.PushValue (value);
m_get_shared_cache_class_info_function.reset(new ClangFunction (*m_process,
@@ -1610,7 +1610,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache()
Value return_value;
return_value.SetValueType (Value::eValueTypeScalar);
//return_value.SetContext (Value::eContextTypeClangType, clang_uint32_t_type);
- return_value.SetClangType (clang_uint32_t_type);
+ return_value.SetCompilerType (clang_uint32_t_type);
return_value.GetScalar() = 0;
errors.Clear();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index 40f8e89a57b..3e5bb8c749a 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -526,7 +526,7 @@ AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines (void *baton,
input_value.SetValueType (Value::eValueTypeScalar);
//input_value.SetContext (Value::eContextTypeClangType, clang_void_ptr_type);
- input_value.SetClangType (clang_void_ptr_type);
+ input_value.SetCompilerType (clang_void_ptr_type);
argument_values.PushValue(input_value);
bool success = abi->GetArgumentValues (exe_ctx.GetThreadRef(), argument_values);
@@ -901,7 +901,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
CompilerType clang_void_ptr_type = clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
void_ptr_value.SetValueType (Value::eValueTypeScalar);
//void_ptr_value.SetContext (Value::eContextTypeClangType, clang_void_ptr_type);
- void_ptr_value.SetClangType (clang_void_ptr_type);
+ void_ptr_value.SetCompilerType (clang_void_ptr_type);
int obj_index;
int sel_index;
@@ -1083,7 +1083,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto
CompilerType clang_int_type = clang_ast_context->GetBuiltinTypeForEncodingAndBitSize(lldb::eEncodingSint, 32);
flag_value.SetValueType (Value::eValueTypeScalar);
//flag_value.SetContext (Value::eContextTypeClangType, clang_int_type);
- flag_value.SetClangType (clang_int_type);
+ flag_value.SetCompilerType (clang_int_type);
if (this_dispatch.stret_return)
flag_value.GetScalar() = 1;
OpenPOWER on IntegriCloud