summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ASTResultSynthesizer.cpp
diff options
context:
space:
mode:
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