================
@@ -16,7 +18,23 @@ lldb::ValueObjectSP 
lldb_private::formatters::GetDesugaredSmartPointerValue(
 
   auto arg = container_type.GetTypeTemplateArgument(0);
   if (!arg)
-    return nullptr;
+    // If there isn't enough debug info, use the pointer type as is
+    return ptr.GetSP();
 
   return ptr.Cast(arg.GetPointerType());
 }
+
+lldb_private::SyntheticChildrenFrontEnd *
+lldb_private::formatters::GenericSmartPointerSyntheticFrontEndCreator(
+    CXXSyntheticChildren *children, lldb::ValueObjectSP valobj_sp) {
+  if (auto *msvc = MsvcStlSmartPointerSyntheticFrontEndCreator(valobj_sp))
+    return msvc;
+
+  return LibStdcppSharedPtrSyntheticFrontEndCreator(children, valobj_sp);
+}
+
+bool lldb_private::formatters::GenericSmartPointerSummaryProvider(
+    ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
+  return MsvcStlSmartPointerSummaryProvider(valobj, stream, options) ||
----------------
Michael137 wrote:

This probably works just fine but could we add a `IsMsvcStlSmartPointer` here 
too and call the appropriate summary provider that way?

https://github.com/llvm/llvm-project/pull/147575
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to