================
@@ -250,17 +254,35 @@ const ASTContext &Value::getASTContext() const {
   return getInterpreter().getASTContext();
 }
 
-void Value::dump() const { print(llvm::outs()); }
+void Value::dump() { print(llvm::outs()); }
 
 void Value::printType(llvm::raw_ostream &Out) const {
-  Out << "Not implement yet.\n";
+  Out << Interp->ValueTypeToString(*this);
 }
-void Value::printData(llvm::raw_ostream &Out) const {
-  Out << "Not implement yet.\n";
+
+void Value::printData(llvm::raw_ostream &Out) {
+  Out << Interp->ValueDataToString(*this);
 }
-void Value::print(llvm::raw_ostream &Out) const {
+// FIXME: We do not support the multiple inheritance case where one of the base
+// classes has a pretty-printer and the other does not.
+void Value::print(llvm::raw_ostream &Out) {
   assert(OpaqueType != nullptr && "Can't print default Value");
-  Out << "Not implement yet.\n";
+
+  // Don't even try to print a void or an invalid type, it doesn't make sense.
+  if (getType()->isVoidType() || !isValid())
----------------
AaronBallman wrote:

Shouldn't a `void` type at least print the type?

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

Reply via email to