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

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 25 10:35:31 PDT 2019


aprantl added inline comments.


================
Comment at: source/Core/ValueObject.cpp:1699
   if (process) {
-    LanguageRuntime *runtime =
-        process->GetLanguageRuntime(GetObjectRuntimeLanguage());
-    if (!runtime)
-      runtime = ObjCLanguageRuntime::Get(*process);
-    if (runtime)
-      return runtime->IsRuntimeSupportValue(*this);
-    // If there is no language runtime, trust the compiler to mark all
-    // runtime support variables as artificial.
-    return GetVariable() && GetVariable()->IsArtificial();
+    bool marked_as_runtime_support_val = GetVariable() && GetVariable()->IsArtificial();
+
----------------
```
if (!process)
  return false;
if (!marked_as_runtime_support_val)
  return false;
```


================
Comment at: source/Core/ValueObject.cpp:1706
+    for (auto *runtime : process->GetLanguageRuntimes()) {
+      if (marked_as_runtime_support_val && runtime->IsWhitelistedRuntimeValue(GetName()))
+        return false;
----------------
then this condition becomes
```
if (runtime->IsWhitelistedRuntimeValue(GetName()))
  return false;
```


================
Comment at: source/Core/ValueObject.cpp:1713
+    // runtime support values as artificial.
+    return marked_as_runtime_support_val;
   }
----------------
`return true;`


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

https://reviews.llvm.org/D63240





More information about the lldb-commits mailing list