[Lldb-commits] [lldb] r134715 - in /lldb/trunk/source: Expression/ClangExpressionDeclMap.cpp Symbol/ClangASTContext.cpp
Greg Clayton
gclayton at apple.com
Fri Jul 8 11:27:39 PDT 2011
Author: gclayton
Date: Fri Jul 8 13:27:39 2011
New Revision: 134715
URL: http://llvm.org/viewvc/llvm-project?rev=134715&view=rev
Log:
Fixed a few issues where typedefs weren't passing through to the correct
recursive function.
Also fixed ClangASTContext::IsPointerType to correctly NULL out the pointee
handle if a valid one is provided.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=134715&r1=134714&r2=134715&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri Jul 8 13:27:39 2011
@@ -1919,6 +1919,7 @@
if (!ClangASTContext::IsPointerType(self_user_type.GetOpaqueQualType(),
&pointer_target_type))
+ || pointer_target_type == NULL)
return;
TypeFromUser class_user_type(pointer_target_type,
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=134715&r1=134714&r2=134715&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jul 8 13:27:39 2011
@@ -4087,7 +4087,7 @@
break;
case clang::Type::Typedef:
- return ClangASTContext::IsPossibleCPlusPlusDynamicType (ast, cast<TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr(), dynamic_pointee_type);
+ return ClangASTContext::IsPossibleDynamicType (ast, cast<TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr(), dynamic_pointee_type);
default:
break;
@@ -4382,8 +4382,11 @@
}
bool
-ClangASTContext::IsPointerType (clang_type_t clang_type, clang_type_t*target_type)
+ClangASTContext::IsPointerType (clang_type_t clang_type, clang_type_t *target_type)
{
+ if (target_type)
+ *target_type = NULL;
+
if (clang_type)
{
QualType qual_type (QualType::getFromOpaquePtr(clang_type));
@@ -4417,7 +4420,7 @@
*target_type = cast<MemberPointerType>(qual_type)->getPointeeType().getAsOpaquePtr();
return true;
case clang::Type::Typedef:
- return ClangASTContext::IsPointerOrReferenceType (cast<TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr(), target_type);
+ return ClangASTContext::IsPointerType (cast<TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr(), target_type);
default:
break;
}
More information about the lldb-commits
mailing list