summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ASTResultSynthesizer.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-12-08 19:04:34 +0000
committerSean Callanan <scallanan@apple.com>2011-12-08 19:04:34 +0000
commit5780f9df56ec5efda7e40df8a88d8c6057663033 (patch)
tree0ce22c6287cb52428592bfa51586316a051c6dbb /lldb/source/Expression/ASTResultSynthesizer.cpp
parent4d1a2d449fff9d0883f5419766c60c8c54be70be (diff)
downloadbcm5719-llvm-5780f9df56ec5efda7e40df8a88d8c6057663033.tar.gz
bcm5719-llvm-5780f9df56ec5efda7e40df8a88d8c6057663033.zip
Added the ability to dereference an Objective-C object
pointer to make the result of an expression. LLDB now dumps the ivars of the Objective-C object and all of its parents. This just required fixing a bug where we didn't distinguish between Objective-C object pointers and regular C-style pointers. Also added a testcase to verify that this continues to work. llvm-svn: 146164
Diffstat (limited to 'lldb/source/Expression/ASTResultSynthesizer.cpp')
-rw-r--r--lldb/source/Expression/ASTResultSynthesizer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp
index ff3b2f4814d..6e2551cf1d5 100644
--- a/lldb/source/Expression/ASTResultSynthesizer.cpp
+++ b/lldb/source/Expression/ASTResultSynthesizer.cpp
@@ -331,7 +331,12 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body,
else
result_ptr_id = &Ctx.Idents.get("$__lldb_expr_result_ptr");
- QualType ptr_qual_type = Ctx.getPointerType(expr_qual_type);
+ QualType ptr_qual_type;
+
+ if (isa<ObjCObjectType>(expr_qual_type))
+ ptr_qual_type = Ctx.getObjCObjectPointerType(expr_qual_type);
+ else
+ ptr_qual_type = Ctx.getPointerType(expr_qual_type);
result_decl = VarDecl::Create(Ctx,
DC,
OpenPOWER on IntegriCloud