diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-11 15:04:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-11 15:04:40 +0000 |
commit | 874ddadf722a6a58cf3c5278f4d31187452d6a92 (patch) | |
tree | 3ae033e9bc6b9b7bd47c6d63db7800144d67c6b7 /llvm/lib/VMCore/Value.cpp | |
parent | 931ef3bf05e77704fb4ab16033666471b48883f7 (diff) | |
download | bcm5719-llvm-874ddadf722a6a58cf3c5278f4d31187452d6a92.tar.gz bcm5719-llvm-874ddadf722a6a58cf3c5278f4d31187452d6a92.zip |
Updates to support
* Changes in PHI node structure
llvm-svn: 25
Diffstat (limited to 'llvm/lib/VMCore/Value.cpp')
-rw-r--r-- | llvm/lib/VMCore/Value.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index 1c3f76bc4b6..ee642f69ce9 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -27,6 +27,12 @@ Value::Value(const Type *ty, ValueTy vty, const string &name = "") : Name(name){ Value::~Value() { #ifndef NDEBUG // Only in -g mode... + // Check to make sure that there are no uses of this value that are still + // around when the value is destroyed. If there are, then we have a dangling + // reference and something is wrong. This code is here to print out what is + // still being referenced. The value in question should be printed as + // a <badref> + // if (Uses.begin() != Uses.end()) { for (use_const_iterator I = Uses.begin(); I != Uses.end(); I++) cerr << "Use still stuck around after Def is destroyed:" << *I << endl; |