diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-07 22:32:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-07 22:32:25 +0000 |
commit | 650b6e8e6ccf3521e7690b439fb1ac0cf575111d (patch) | |
tree | 896bfd4f85496a29049c60c55a41b05da692d80c | |
parent | 8da78afce3609f8ac31bef9d1310744a47bbd0cc (diff) |
Remove some gross code by using the VAlue::dump method to do debug dumps
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2149 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Constants.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index acec62b4f1..b73886cf1b 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -57,11 +57,6 @@ Constant *Constant::getNullConstant(const Type *Ty) { } } -#ifndef NDEBUG -#include "llvm/Assembly/Writer.h" -using std::cerr; -#endif - void Constant::destroyConstantImpl() { // When a Constant is destroyed, there may be lingering // references to the constant by other constants in the constant pool. These @@ -74,8 +69,11 @@ void Constant::destroyConstantImpl() { Value *V = use_back(); #ifndef NDEBUG // Only in -g mode... if (!isa<Constant>(V)) { - cerr << "While deleting: " << this << "\n"; - cerr << "Use still stuck around after Def is destroyed: " << V << "\n"; + std::cerr << "While deleting: "; + dump(); + std::cerr << "\nUse still stuck around after Def is destroyed: "; + V->dump(); + std::cerr << "\n"; } #endif assert(isa<Constant>(V) && "References remain to ConstantPointerRef!"); |