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 | ee976f33713016a96e3fbb394b7d0c5465be25d7 (patch) | |
tree | 0ad7614e587c63accb1cabbe2cc2ff30acefdac5 /lib/VMCore/Value.cpp | |
parent | c24d2088dc3d79e3b7e38a358b4a71f156c06836 (diff) |
Updates to support
* Changes in PHI node structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index 1c3f76bc4b..ee642f69ce 100644 --- a/lib/VMCore/Value.cpp +++ b/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; |