Page MenuHomePhabricator

[NFC][VPlan] Guard print routines with "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

Authored by a.elovikov on Mar 18 2021, 2:11 PM.

Diff Detail

Event Timeline

a.elovikov created this revision.Mar 18 2021, 2:11 PM
a.elovikov requested review of this revision.Mar 18 2021, 2:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 2:11 PM
mehdi_amini accepted this revision.Mar 18 2021, 2:24 PM

Thanks for the cleanup!


You may want to tag the dump() ones with LLVM_DUMP_METHOD:

/// Mark debug helper function definitions like dump() that should not be
/// stripped from debug builds.
/// Note that you should also surround dump() functions with
/// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always
/// get stripped in release builds.
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

Most places in LLVM would have it defined like this: LLVM_DUMP_METHOD void dump() const;

This revision is now accepted and ready to land.Mar 18 2021, 2:24 PM
This revision was landed with ongoing or failed builds.Mar 19 2021, 10:51 AM
This revision was automatically updated to reflect the committed changes.