From: Sean Callanan Date: Tue, 4 Dec 2012 20:56:04 +0000 (+0000) Subject: In the data formatters, if we know the result X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7cb3145a03b0c146bafae57b600c9e7ba05b12d;p=platform%2Fupstream%2Fllvm.git 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. llvm-svn: 169300 --- diff --git a/lldb/source/Core/CXXFormatterFunctions.cpp b/lldb/source/Core/CXXFormatterFunctions.cpp index c458cf2..32bb296 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,