Display the pointer value in the libstdc++ unique_ptr summary

Summary:
r284830 added a summary provider for unique_ptr in libstdc++, whose value printed
the value of the pointee. This is a bit unintuitive as it becomes unobvious that
the value actually is a pointer, and we lose the way to actually obtain the
pointer value.

Change that to print the pointer value instead. The pointee value can still be
obtained through the synthetic children.

Reviewers: tberghammer, granata.enrico

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D26403

llvm-svn: 286355
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
index 6368199..4eb3b95 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
@@ -126,23 +126,14 @@
   if (!m_ptr_obj)
     return false;
 
-  if (m_ptr_obj->GetValueAsUnsigned(0) == 0) {
+  bool success;
+  uint64_t ptr_value = m_ptr_obj->GetValueAsUnsigned(0, &success);
+  if (!success)
+    return false;
+  if (ptr_value == 0)
     stream.Printf("nullptr");
-  } else {
-    Error error;
-    bool print_pointee = false;
-    if (m_obj_obj) {
-      if (m_obj_obj->DumpPrintableRepresentation(
-              stream, ValueObject::eValueObjectRepresentationStyleSummary,
-              lldb::eFormatInvalid,
-              ValueObject::PrintableRepresentationSpecialCases::eDisable,
-              false)) {
-        print_pointee = true;
-      }
-    }
-    if (!print_pointee)
-      stream.Printf("ptr = 0x%" PRIx64, m_ptr_obj->GetValueAsUnsigned(0));
-  }
+  else
+    stream.Printf("0x%" PRIx64, ptr_value);
   return true;
 }