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 {
472
472
return LLVM_LIKELY (Type == T_Array) ? &as<json::Array>() : nullptr ;
473
473
}
474
474
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
+
475
483
private:
476
484
void destroy ();
477
485
void copyFrom (const Value &M);
Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ void Value::destroy() {
182
182
}
183
183
}
184
184
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
+
185
189
bool operator ==(const Value &L, const Value &R) {
186
190
if (L.kind () != R.kind ())
187
191
return false ;
You can’t perform that action at this time.
0 commit comments