diff options
author | Sean Callanan <scallanan@apple.com> | 2011-12-21 22:22:58 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-12-21 22:22:58 +0000 |
commit | 20bb3aa53a0c9ed02dbcdd216f4607034c9e1122 (patch) | |
tree | d0e70105a732af46382d8307b6667a3daa892e07 /lldb/source/Target/Process.cpp | |
parent | 51c81685a89565a01b3decbc7156b288bb80858a (diff) | |
download | bcm5719-llvm-20bb3aa53a0c9ed02dbcdd216f4607034c9e1122.tar.gz bcm5719-llvm-20bb3aa53a0c9ed02dbcdd216f4607034c9e1122.zip |
The "desired result type" code in the expression
parser has hitherto been an implementation waiting
for a use. I have now tied the '-o' option for
the expression command -- which indicates that the
result is an Objective-C object and needs to be
printed -- to the ExpressionParser, which
communicates the desired type to Clang.
Now, if the result of an expression is determined
by an Objective-C method call for which there is
no type information, that result is implicitly
cast to id if and only if the -o option is passed
to the expression command. (Otherwise if there
is no explicit cast Clang will issue an error.
This behavior is identical to what happened before
r146756.)
Also added a testcase for -o enabled and disabled.
llvm-svn: 147099
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index fdd6b1753c7..50bcb7a952a 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1328,7 +1328,7 @@ Process::LoadImage (const FileSpec &image_spec, Error &error) expr.Printf("dlopen (\"%s\", 2)", path); const char *prefix = "extern \"C\" void* dlopen (const char *path, int mode);\n"; lldb::ValueObjectSP result_valobj_sp; - ClangUserExpression::Evaluate (exe_ctx, eExecutionPolicyAlways, lldb::eLanguageTypeUnknown, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); + ClangUserExpression::Evaluate (exe_ctx, eExecutionPolicyAlways, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); error = result_valobj_sp->GetError(); if (error.Success()) { @@ -1392,7 +1392,7 @@ Process::UnloadImage (uint32_t image_token) expr.Printf("dlclose ((void *)0x%llx)", image_addr); const char *prefix = "extern \"C\" int dlclose(void* handle);\n"; lldb::ValueObjectSP result_valobj_sp; - ClangUserExpression::Evaluate (exe_ctx, eExecutionPolicyAlways, lldb::eLanguageTypeUnknown, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); + ClangUserExpression::Evaluate (exe_ctx, eExecutionPolicyAlways, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); if (result_valobj_sp->GetError().Success()) { Scalar scalar; |