diff --git a/llvm/include/llvm/Support/ScaledNumber.h b/llvm/include/llvm/Support/ScaledNumber.h index 3d38677f0eb61..87a56809976a3 100644 --- a/llvm/include/llvm/Support/ScaledNumber.h +++ b/llvm/include/llvm/Support/ScaledNumber.h @@ -424,10 +424,7 @@ class ScaledNumberBase { public: static constexpr int DefaultPrecision = 10; -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - LLVM_DUMP_METHOD static void dump(uint64_t D, int16_t E, int Width); -#endif - + LLVM_ABI static void dump(uint64_t D, int16_t E, int Width); LLVM_ABI static raw_ostream &print(raw_ostream &OS, uint64_t D, int16_t E, int Width, unsigned Precision); LLVM_ABI static std::string toString(uint64_t D, int16_t E, int Width, @@ -610,12 +607,7 @@ template class ScaledNumber : ScaledNumberBase { unsigned Precision = DefaultPrecision) const { return ScaledNumberBase::print(OS, Digits, Scale, Width, Precision); } - -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - LLVM_DUMP_METHOD void dump() const { - return ScaledNumberBase::dump(Digits, Scale, Width); - } -#endif + void dump() const { return ScaledNumberBase::dump(Digits, Scale, Width); } ScaledNumber &operator+=(const ScaledNumber &X) { std::tie(Digits, Scale) = diff --git a/llvm/lib/Support/ScaledNumber.cpp b/llvm/lib/Support/ScaledNumber.cpp index 33e8cc3030873..85d7afbea5c69 100644 --- a/llvm/lib/Support/ScaledNumber.cpp +++ b/llvm/lib/Support/ScaledNumber.cpp @@ -317,9 +317,7 @@ raw_ostream &ScaledNumberBase::print(raw_ostream &OS, uint64_t D, int16_t E, return OS << toString(D, E, Width, Precision); } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) -LLVM_DUMP_METHOD void ScaledNumberBase::dump(uint64_t D, int16_t E, int Width) { +void ScaledNumberBase::dump(uint64_t D, int16_t E, int Width) { print(dbgs(), D, E, Width, 0) << "[" << Width << ":" << D << "*2^" << E << "]"; } -#endif