[Lldb-commits] [PATCH] D63240: [Core] Generalize ValueObject::IsRuntimeSupportValue

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 13 00:20:28 PDT 2019

labath added a reviewer: aprantl.
labath added a comment.

+ Adrian, as I believe we touched this code recently...

Comment at: include/lldb/Target/LanguageRuntime.h:160-162
+  /// Identify whether a name is a runtime value that should not be hidden by
+  /// from the user interface.
+  virtual bool IsWhitelistedRuntimeValue(ConstString name) { return false; }
Could we make this a non-public extension point, and make it so that it is automatically invoked from `IsRuntimeSupportValue` ?

That would simplify the code on the caller side..

Comment at: source/Target/CPPLanguageRuntime.cpp:47-59
-  // All runtime support values have to be marked as artificial by the
-  // compiler. But not all artificial variables should be hidden from
-  // the user.
-  if (!valobj.GetVariable())
-    return false;
-  if (!valobj.GetVariable()->IsArtificial())
-    return false;
I don't think you're preserving the semantics here. Previously If `GetObjectRuntimeLanguage()` returned "C++", we would still end up consulting the objc white list. However, now you don't do that..

The new code actually makes more sense to me, but I'm guessing there was a reason things were implemented this way. However, I'm not that familiar with this code, so I'm not sure what to do about that, or whether it even matters...



More information about the lldb-commits mailing list