Prechádzať zdrojové kódy

final cleanup, the code is now in a reviewable state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49592 91177308-0d34-0410-b5e6-96231b3b80d8
Chris Lattner 17 rokov pred
rodič
commit
22cb282b29
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      lib/Rewrite/DeltaTree.cpp

+ 6 - 1
lib/Rewrite/DeltaTree.cpp

@@ -289,7 +289,9 @@ void DeltaTreeInteriorNode::SplitChild(unsigned ChildNo) {
 //                        DeltaTree Implementation
 //===----------------------------------------------------------------------===//
 
+//#define VERIFY_TREE
 
+#ifdef VERIFY_TREE
 /// VerifyTree - Walk the btree performing assertions on various properties to
 /// verify consistency.  This is useful for debugging new changes to the tree.
 static void VerifyTree(const DeltaTreeNode *N) {
@@ -331,6 +333,7 @@ static void VerifyTree(const DeltaTreeNode *N) {
   
   assert(FullDelta == N->getFullDelta());
 }
+#endif  // VERIFY_TREE
 
 static DeltaTreeNode *getRoot(void *Root) {
   return (DeltaTreeNode*)Root;
@@ -411,6 +414,8 @@ void DeltaTree::AddDelta(unsigned FileIndex, int Delta) {
   
   getRoot(Root)->AddDeltaNonFull(FileIndex, Delta);
   
-  //VerifyTree(Root);
+#ifdef VERIFY_TREE
+  VerifyTree(Root);
+#endif
 }