forked from OSchip/llvm-project
IR: Default the Metadata::dump() argument "harder" after r232275
Use an overload instead of a default argument for `Metadata::dump()`. The latter seems to require calling `dump(nullptr)` explicitly when using a debugger, where as the former doesn't. Other than utility for debugging, there's NFC here. llvm-svn: 232315
This commit is contained in:
parent
2b6dd68535
commit
a66dc8f689
|
@ -106,7 +106,14 @@ public:
|
||||||
///
|
///
|
||||||
/// If \c M is provided, metadata nodes will be numbered canonically;
|
/// If \c M is provided, metadata nodes will be numbered canonically;
|
||||||
/// otherwise, pointer addresses are substituted.
|
/// otherwise, pointer addresses are substituted.
|
||||||
void dump(const Module *M = nullptr) const;
|
///
|
||||||
|
/// Note: this uses an explicit overload instead of default arguments so that
|
||||||
|
/// the nullptr version is easy to call from a debugger.
|
||||||
|
///
|
||||||
|
/// @{
|
||||||
|
void dump() const;
|
||||||
|
void dump(const Module *M) const;
|
||||||
|
/// @}
|
||||||
|
|
||||||
/// \brief Print.
|
/// \brief Print.
|
||||||
///
|
///
|
||||||
|
|
|
@ -3289,6 +3289,9 @@ void Comdat::dump() const { print(dbgs()); }
|
||||||
LLVM_DUMP_METHOD
|
LLVM_DUMP_METHOD
|
||||||
void NamedMDNode::dump() const { print(dbgs()); }
|
void NamedMDNode::dump() const { print(dbgs()); }
|
||||||
|
|
||||||
|
LLVM_DUMP_METHOD
|
||||||
|
void Metadata::dump() const { dump(nullptr); }
|
||||||
|
|
||||||
LLVM_DUMP_METHOD
|
LLVM_DUMP_METHOD
|
||||||
void Metadata::dump(const Module *M) const {
|
void Metadata::dump(const Module *M) const {
|
||||||
print(dbgs(), M);
|
print(dbgs(), M);
|
||||||
|
|
Loading…
Reference in New Issue