diff --git a/llvm/include/llvm/Support/JSON.h b/llvm/include/llvm/Support/JSON.h index 3e3f783ffb857..7f7f5f6228763 100644 --- a/llvm/include/llvm/Support/JSON.h +++ b/llvm/include/llvm/Support/JSON.h @@ -472,8 +472,8 @@ class Value { return LLVM_LIKELY(Type == T_Array) ? &as() : nullptr; } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) void print(llvm::raw_ostream &OS) const; +#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void dump() const { print(llvm::dbgs()); llvm::dbgs() << '\n'; diff --git a/llvm/lib/Support/JSON.cpp b/llvm/lib/Support/JSON.cpp index 98fef5dcf68a3..e7b762f550d46 100644 --- a/llvm/lib/Support/JSON.cpp +++ b/llvm/lib/Support/JSON.cpp @@ -182,9 +182,7 @@ void Value::destroy() { } } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) void Value::print(llvm::raw_ostream &OS) const { OS << *this; } -#endif // !NDEBUG || LLVM_ENABLE_DUMP bool operator==(const Value &L, const Value &R) { if (L.kind() != R.kind())