[Lldb-commits] [lldb] r123881 - in /lldb/trunk: lldb.xcodeproj/project.pbxproj source/Symbol/ClangASTContext.cpp
Greg Clayton
gclayton at apple.com
Wed Jan 19 20:18:48 PST 2011
Author: gclayton
Date: Wed Jan 19 22:18:48 2011
New Revision: 123881
URL: http://llvm.org/viewvc/llvm-project?rev=123881&view=rev
Log:
Fixed the auto completion of objective C types with the new ExternalASTSource
changes that recently happened.
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=123881&r1=123880&r2=123881&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Wed Jan 19 22:18:48 2011
@@ -2370,6 +2370,7 @@
isa = PBXProject;
buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=123881&r1=123880&r2=123881&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Jan 19 22:18:48 2011
@@ -118,8 +118,9 @@
external_ast_source->CompleteType (class_interface_decl);
is_forward_decl = class_interface_decl->isForwardDecl();
}
+ return is_forward_decl == false;
}
- return is_forward_decl;
+ return true;
}
}
break;
@@ -1056,7 +1057,7 @@
if (cxx_record_decl)
{
cxx_record_decl->setHasExternalLexicalStorage (has_extern);
- //cxx_record_decl->setHasExternalVisibleStorage (has_extern);
+ cxx_record_decl->setHasExternalVisibleStorage (has_extern);
return true;
}
}
@@ -1068,7 +1069,7 @@
if (enum_decl)
{
enum_decl->setHasExternalLexicalStorage (has_extern);
- //enum_decl->setHasExternalVisibleStorage (has_extern);
+ enum_decl->setHasExternalVisibleStorage (has_extern);
return true;
}
}
@@ -1086,7 +1087,7 @@
if (class_interface_decl)
{
class_interface_decl->setHasExternalLexicalStorage (has_extern);
- //class_interface_decl->setHasExternalVisibleStorage (has_extern);
+ class_interface_decl->setHasExternalVisibleStorage (has_extern);
return true;
}
}
@@ -1459,7 +1460,16 @@
cxx_method_decl->setParams (params, num_params);
cxx_record_decl->addDecl (cxx_method_decl);
-
+
+// printf ("decl->isPolymorphic() = %i\n", cxx_record_decl->isPolymorphic());
+// printf ("decl->isAggregate() = %i\n", cxx_record_decl->isAggregate());
+// printf ("decl->isPOD() = %i\n", cxx_record_decl->isPOD());
+// printf ("decl->isEmpty() = %i\n", cxx_record_decl->isEmpty());
+// printf ("decl->isAbstract() = %i\n", cxx_record_decl->isAbstract());
+// printf ("decl->hasTrivialConstructor() = %i\n", cxx_record_decl->hasTrivialConstructor());
+// printf ("decl->hasTrivialCopyConstructor() = %i\n", cxx_record_decl->hasTrivialCopyConstructor());
+// printf ("decl->hasTrivialCopyAssignment() = %i\n", cxx_record_decl->hasTrivialCopyAssignment());
+// printf ("decl->hasTrivialDestructor() = %i\n", cxx_record_decl->hasTrivialDestructor());
return cxx_method_decl;
}
@@ -2120,7 +2130,7 @@
case clang::Type::Complex: return 0;
case clang::Type::Record:
- if (ClangASTContext::GetCompleteType (ast, clang_type))
+ if (GetCompleteQualType (ast, qual_type))
{
const RecordType *record_type = cast<RecordType>(qual_type.getTypePtr());
const RecordDecl *record_decl = record_type->getDecl();
@@ -2163,6 +2173,7 @@
case clang::Type::ObjCObject:
case clang::Type::ObjCInterface:
+ if (GetCompleteQualType (ast, qual_type))
{
ObjCObjectType *objc_class_type = dyn_cast<ObjCObjectType>(qual_type.getTypePtr());
assert (objc_class_type);
@@ -2427,7 +2438,7 @@
break;
case clang::Type::Record:
- if (ClangASTContext::GetCompleteType (ast, parent_clang_type))
+ if (GetCompleteQualType (ast, parent_qual_type))
{
const RecordType *record_type = cast<RecordType>(parent_qual_type.getTypePtr());
const RecordDecl *record_decl = record_type->getDecl();
@@ -2517,6 +2528,7 @@
case clang::Type::ObjCObject:
case clang::Type::ObjCInterface:
+ if (GetCompleteQualType (ast, parent_qual_type))
{
ObjCObjectType *objc_class_type = dyn_cast<ObjCObjectType>(parent_qual_type.getTypePtr());
assert (objc_class_type);
@@ -2958,7 +2970,7 @@
switch (type_class)
{
case clang::Type::Record:
- if (ClangASTContext::GetCompleteType (ast, clang_type))
+ if (GetCompleteQualType (ast, qual_type))
{
const RecordType *record_type = cast<RecordType>(qual_type.getTypePtr());
const RecordDecl *record_decl = record_type->getDecl();
@@ -3047,6 +3059,7 @@
case clang::Type::ObjCObject:
case clang::Type::ObjCInterface:
+ if (GetCompleteQualType (ast, qual_type))
{
StringRef name_sref(name);
ObjCObjectType *objc_class_type = dyn_cast<ObjCObjectType>(qual_type.getTypePtr());
@@ -3238,7 +3251,7 @@
switch (type_class)
{
case clang::Type::Record:
- if (ClangASTContext::GetCompleteType (ast, clang_type))
+ if (GetCompleteQualType (ast, qual_type))
{
const RecordType *record_type = cast<RecordType>(qual_type.getTypePtr());
const RecordDecl *record_decl = record_type->getDecl();
@@ -3282,6 +3295,7 @@
case clang::Type::ObjCObject:
case clang::Type::ObjCInterface:
+ if (GetCompleteQualType (ast, qual_type))
{
StringRef name_sref(name);
ObjCObjectType *objc_class_type = dyn_cast<ObjCObjectType>(qual_type.getTypePtr());
@@ -4354,8 +4368,7 @@
if (clang_type == NULL)
return false;
- clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
- return GetCompleteQualType (ast, qual_type);
+ return GetCompleteQualType (ast, clang::QualType::getFromOpaquePtr(clang_type));
}
More information about the lldb-commits
mailing list