diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-31 21:27:38 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-31 21:27:38 +0000 |
commit | e7422f6b8d8caf18c8f2eea571360637b4082e65 (patch) | |
tree | 96fc313cff6b6ba8000e548f5b3df287cfc646d8 /llvm/lib/Support/FoldingSet.cpp | |
parent | 05848363407c01d10b90db4db829002a26cfc062 (diff) | |
download | bcm5719-llvm-e7422f6b8d8caf18c8f2eea571360637b4082e65.tar.gz bcm5719-llvm-e7422f6b8d8caf18c8f2eea571360637b4082e65.zip |
Add some debug output.
llvm-svn: 33718
Diffstat (limited to 'llvm/lib/Support/FoldingSet.cpp')
-rw-r--r-- | llvm/lib/Support/FoldingSet.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/FoldingSet.cpp b/llvm/lib/Support/FoldingSet.cpp index dbf3a583d86..1d04abf4e46 100644 --- a/llvm/lib/Support/FoldingSet.cpp +++ b/llvm/lib/Support/FoldingSet.cpp @@ -14,8 +14,10 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "foldingset" #include "llvm/ADT/FoldingSet.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/Debug.h" #include <cassert> using namespace llvm; @@ -225,6 +227,7 @@ FoldingSetImpl::Node *FoldingSetImpl::FindNodeOrInsertPos(const NodeID &ID, /// FindNodeOrInsertPos. void FoldingSetImpl::InsertNode(Node *N, void *InsertPos) { // Do we need to grow the hashtable? + DEBUG(DOUT << "INSERT: " << N << '\n'); if (NumNodes+1 > NumBuckets*2) { GrowHashTable(); NodeID ID; @@ -255,6 +258,7 @@ bool FoldingSetImpl::RemoveNode(Node *N) { // Because each bucket is a circular list, we don't need to compute N's hash // to remove it. Chase around the list until we find the node (or bucket) // which points to N. + DEBUG(DOUT << "REMOVE: " << N << '\n'); void *Ptr = N->getNextInBucket(); if (Ptr == 0) return false; // Not in folding set. |