Skip to content

[llvm] revert preprocessor dump method guards from llvm::ScaledNumber #140574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions llvm/include/llvm/Support/ScaledNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -610,12 +607,7 @@ template <class DigitsT> 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) =
Expand Down
4 changes: 1 addition & 3 deletions llvm/lib/Support/ScaledNumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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