[Lldb-commits] [PATCH] D127605: [lldb] Support non-pointer implicit this/self in GetValueForVariableExpressionPath

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Jun 12 12:10:49 PDT 2022


kastiglione updated this revision to Diff 436243.
kastiglione added a comment.
Herald added a subscriber: JDevlieghere.

use explicit type instead of auto


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127605/new/

https://reviews.llvm.org/D127605

Files:
  lldb/source/Target/StackFrame.cpp


Index: lldb/source/Target/StackFrame.cpp
===================================================================
--- lldb/source/Target/StackFrame.cpp
+++ lldb/source/Target/StackFrame.cpp
@@ -563,7 +563,12 @@
         var_sp = variable_list->FindVariable(method_object_name);
         if (var_sp) {
           separator_idx = 0;
-          var_expr_storage = "->";
+          if (Type *var_type = var_sp->GetType())
+            if (!var_type->GetForwardCompilerType().IsPointerType())
+              var_expr_storage = ".";
+
+          if (var_expr_storage.empty())
+            var_expr_storage = "->";
           var_expr_storage += var_expr;
           var_expr = var_expr_storage;
           synthetically_added_instance_object = true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127605.436243.patch
Type: text/x-patch
Size: 739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220612/b4eb2d2d/attachment.bin>


More information about the lldb-commits mailing list