================
@@ -473,18 +473,57 @@ lldb::SBValue SBValue::CreateValueFromExpression(const 
char *name,
                                                  SBExpressionOptions &options) 
{
   LLDB_INSTRUMENT_VA(this, name, expression, options);
 
-  lldb::SBValue sb_value;
+  lldb::ValueObjectSP new_value_sp;
+  StackFrameSP frame_sp(GetFrame().GetFrameSP());
+  TargetSP target_sp(GetTarget().GetSP());
+  // If enabled, attempt to use DIL to evaluate the expression.
+  bool DIL_success = false;
+  if (frame_sp && target_sp) {
+    bool use_DIL = target_sp->GetUseDILForCreatingValues();
+    if (use_DIL) {
+      Status error;
+      if (frame_sp) {
----------------
qiyao wrote:

`if (frame_sp && target_sp)` above already guarantees `frame_sp` is non-null, 
so this `if (frame_sp)` is redundant.

https://github.com/llvm/llvm-project/pull/222192
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to