[Lldb-commits] [lldb] r109795 - /lldb/trunk/source/Symbol/ClangASTContext.cpp
Greg Clayton
gclayton at apple.com
Thu Jul 29 13:06:32 PDT 2010
Author: gclayton
Date: Thu Jul 29 15:06:32 2010
New Revision: 109795
URL: http://llvm.org/viewvc/llvm-project?rev=109795&view=rev
Log:
Fixed "void *ClangASTContext::CreatePointerType (void *clang_type);" to return objective C pointers for clang::Type::TypeClass types that are "clang::Type::ObjCObject" and "clang::Type::ObjCInterface" .
Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=109795&r1=109794&r2=109795&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Jul 29 15:06:32 2010
@@ -2594,7 +2594,25 @@
ClangASTContext::CreatePointerType (void *clang_type)
{
if (clang_type)
- return getASTContext()->getPointerType(QualType::getFromOpaquePtr(clang_type)).getAsOpaquePtr();
+ {
+ QualType qual_type (QualType::getFromOpaquePtr(clang_type));
+
+ switch (qual_type->getTypeClass())
+ {
+ case clang::Type::ObjCObject:
+ case clang::Type::ObjCInterface:
+ // TODO: find out if I need to make a pointer or objc pointer for "clang::Type::ObjCObjectPointer" types
+ //case clang::Type::ObjCObjectPointer:
+ return getASTContext()->getObjCObjectPointerType(qual_type).getAsOpaquePtr();
+
+ // TODO: can we detect if this type is a block type?
+// case clang::Type::BlockType:
+// return getASTContext()->getBlockPointerType(qual_type).getAsOpaquePtr();
+
+ default:
+ return getASTContext()->getPointerType(qual_type).getAsOpaquePtr();
+ }
+ }
return NULL;
}
More information about the lldb-commits
mailing list