[JSON][NFC] Move print method out of NDEBUG || DUMP (#131639)

This commit is contained in:
Nikolay Panchenko
2025-03-17 21:12:07 -04:00
committed by GitHub
parent d9c65af626
commit 745e16753f
2 changed files with 1 additions and 3 deletions

View File

@@ -472,8 +472,8 @@ public:
return LLVM_LIKELY(Type == T_Array) ? &as<json::Array>() : 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';

View File

@@ -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())