Skip to content

Commit 745e167

Browse files
authored
[JSON][NFC] Move print method out of NDEBUG || DUMP (#131639)
1 parent d9c65af commit 745e167

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

llvm/include/llvm/Support/JSON.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ class Value {
472472
return LLVM_LIKELY(Type == T_Array) ? &as<json::Array>() : nullptr;
473473
}
474474

475-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
476475
void print(llvm::raw_ostream &OS) const;
476+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
477477
LLVM_DUMP_METHOD void dump() const {
478478
print(llvm::dbgs());
479479
llvm::dbgs() << '\n';

llvm/lib/Support/JSON.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ void Value::destroy() {
182182
}
183183
}
184184

185-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
186185
void Value::print(llvm::raw_ostream &OS) const { OS << *this; }
187-
#endif // !NDEBUG || LLVM_ENABLE_DUMP
188186

189187
bool operator==(const Value &L, const Value &R) {
190188
if (L.kind() != R.kind())

0 commit comments

Comments
 (0)