Преглед изворни кода

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 година
родитељ
комит
22cb282b29
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      lib/Rewrite/DeltaTree.cpp

+ 6 - 1
lib/Rewrite/DeltaTree.cpp

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