File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,14 @@ class Value {
472472 return LLVM_LIKELY (Type == T_Array) ? &as<json::Array>() : nullptr ;
473473 }
474474
475+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
476+ void print (llvm::raw_ostream &OS) const ;
477+ LLVM_DUMP_METHOD void dump () const {
478+ print (llvm::dbgs ());
479+ llvm::dbgs () << ' \n ' ;
480+ }
481+ #endif // !NDEBUG || LLVM_ENABLE_DUMP
482+
475483private:
476484 void destroy ();
477485 void copyFrom (const Value &M);
Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ void Value::destroy() {
182182 }
183183}
184184
185+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
186+ void Value::print (llvm::raw_ostream &OS) const { OS << *this ; }
187+ #endif // !NDEBUG || LLVM_ENABLE_DUMP
188+
185189bool operator ==(const Value &L, const Value &R) {
186190 if (L.kind () != R.kind ())
187191 return false ;
You can’t perform that action at this time.
0 commit comments