clayborg added a comment.

Let me know what everyone thinks of adding a "fully_qualified" argument to the 
TypeSystem::GetClassName()?



================
Comment at: lldb/include/lldb/Symbol/TypeSystem.h:200-201
 
+  virtual llvm::Optional<std::string>
+  GetClassName(const CompilerType &compiler_type) = 0;
+
----------------
Maybe add an extra argument to get a fully qualified class name?

```
/// \param fully_qualified Get the the class basename if false, or a fully 
qualified name if true
virtual llvm::Optional<std::string>
  GetClassName(const CompilerType &compiler_type, bool fully_qualified) = 0;
```

Then the code in the dumper doesn't need to use "::" for all languages in 
ValueObject::GetBaseClassPath


================
Comment at: lldb/source/Core/ValueObject.cpp:2032-2042
+  llvm::Optional<std::string> class_name =
+      type_system->GetClassName(GetCompilerType());
+  bool parent_had_base_class = GetParent() && GetParent()->GetBaseClassPath(s);
+  if (class_name) {
+    if (parent_had_base_class)
+      // FIXME: This is still specific to C++. We should implement something
+      // like `GetClassSeparator` in the Language plugins to figure out what to
----------------
```
bool fully_qualified = true;
llvm::Optional<std::string> class_name = 
type_system->GetClassName(GetCompilerType(), fully_qualified);
if (class_name)
  s.PutCString(class_name.getValue());
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69820



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to