mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-11 10:25:41 +00:00
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
This commit is contained in:
@@ -57,11 +57,6 @@ Constant *Constant::getNullConstant(const Type *Ty) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
#include "llvm/Assembly/Writer.h"
|
|
||||||
using std::cerr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void Constant::destroyConstantImpl() {
|
void Constant::destroyConstantImpl() {
|
||||||
// When a Constant is destroyed, there may be lingering
|
// When a Constant is destroyed, there may be lingering
|
||||||
// references to the constant by other constants in the constant pool. These
|
// references to the constant by other constants in the constant pool. These
|
||||||
@@ -74,8 +69,11 @@ void Constant::destroyConstantImpl() {
|
|||||||
Value *V = use_back();
|
Value *V = use_back();
|
||||||
#ifndef NDEBUG // Only in -g mode...
|
#ifndef NDEBUG // Only in -g mode...
|
||||||
if (!isa<Constant>(V)) {
|
if (!isa<Constant>(V)) {
|
||||||
cerr << "While deleting: " << this << "\n";
|
std::cerr << "While deleting: ";
|
||||||
cerr << "Use still stuck around after Def is destroyed: " << V << "\n";
|
dump();
|
||||||
|
std::cerr << "\nUse still stuck around after Def is destroyed: ";
|
||||||
|
V->dump();
|
||||||
|
std::cerr << "\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
assert(isa<Constant>(V) && "References remain to ConstantPointerRef!");
|
assert(isa<Constant>(V) && "References remain to ConstantPointerRef!");
|
||||||
|
Reference in New Issue
Block a user