[lldb-dev] Why SBValue::Cast is deprecated and how to replace it with expression?

Roman Popov via lldb-dev lldb-dev at lists.llvm.org
Sun Jan 29 20:17:45 PST 2017


Hello,

SBValue::Cast marked as deprecated in LLDB headers:

// Deprecated - use the expression evaluator to perform type casting
lldb::SBValue Cast(lldb::SBType type);

But I can't understand how to replace it with expression evaluation.

Suppose I have:

auto casted_val = my_value.Cast(my_type);

What would be equivalent expression, taking into account that both value
and type can be out of current scope?


Same question on stackoverflow:

http://stackoverflow.com/questions/41928915/lldb-api-why-sbvaluecast-is-deprecated-and-how-to-replace-it-with-createvalue


Thanks in advance for help,

-Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20170129/ae67d2b5/attachment.html>


More information about the lldb-dev mailing list