diff options
author | Sean Callanan <scallanan@apple.com> | 2012-12-04 20:56:04 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-12-04 20:56:04 +0000 |
commit | c7cb3145a03b0c146bafae57b600c9e7ba05b12d (patch) | |
tree | 424ff893c1d3b1d13ef26f13cb0e74acab923429 /lldb/source | |
parent | 2f505a1c56a3b61fb4b95f7f8a2978f60cf6c1c4 (diff) | |
download | bcm5719-llvm-c7cb3145a03b0c146bafae57b600c9e7ba05b12d.tar.gz bcm5719-llvm-c7cb3145a03b0c146bafae57b600c9e7ba05b12d.zip |
In the data formatters, if we know the result
type of an Objective-C selector, don't bother
making the expression parser resolve it all over
again. Just send the message straight to the
object pointer as if it were an id, and cast the
result.
<rdar://problem/12799087>
llvm-svn: 169300
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Core/CXXFormatterFunctions.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lldb/source/Core/CXXFormatterFunctions.cpp b/lldb/source/Core/CXXFormatterFunctions.cpp index c458cf2e2ff..32bb29654b4 100644 --- a/lldb/source/Core/CXXFormatterFunctions.cpp +++ b/lldb/source/Core/CXXFormatterFunctions.cpp @@ -37,10 +37,8 @@ lldb_private::formatters::ExtractValueFromObjCExpression (ValueObject &valobj, return false; if (!selector || !*selector) return false; - StreamString expr_path_stream; - valobj.GetExpressionPath(expr_path_stream, false); StreamString expr; - expr.Printf("(%s)[%s %s]",target_type,expr_path_stream.GetData(),selector); + expr.Printf("(%s)[(id)0x%llx %s]",target_type,valobj.GetPointerValue(),selector); ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); lldb::ValueObjectSP result_sp; Target* target = exe_ctx.GetTargetPtr(); @@ -51,8 +49,7 @@ lldb_private::formatters::ExtractValueFromObjCExpression (ValueObject &valobj, EvaluateExpressionOptions options; options.SetCoerceToId(false) .SetUnwindOnError(true) - .SetKeepInMemory(true) - .SetUseDynamic(lldb::eDynamicCanRunTarget); + .SetKeepInMemory(true); target->EvaluateExpression(expr.GetData(), stack_frame, |