]> granicus.if.org Git - yasm/commitdiff
Don't include unused checker functions if not checking interval tree
authorPeter Johnson <peter@tortall.net>
Tue, 8 Aug 2006 07:30:22 +0000 (07:30 -0000)
committerPeter Johnson <peter@tortall.net>
Tue, 8 Aug 2006 07:30:22 +0000 (07:30 -0000)
assumptions (with CHECK_INTERVAL_TREE_ASSUMPTIONS define).

svn path=/branches/new-optimizer/; revision=1595

libyasm/inttree.c

index 963276d3685d3d434c001248b391704d1d53c1c4..caabd0ec8903edf1cc8994a2571977256e78e1c8 100644 (file)
@@ -45,10 +45,12 @@ static void TreeInsertHelp(IntervalTree *, IntervalTreeNode *);
 static void TreePrintHelper(const IntervalTree *, IntervalTreeNode *);
 static void FixUpMaxHigh(IntervalTree *, IntervalTreeNode *);
 static void DeleteFixUp(IntervalTree *, IntervalTreeNode *);
+#ifdef CHECK_INTERVAL_TREE_ASSUMPTIONS
 static void CheckMaxHighFields(const IntervalTree *, IntervalTreeNode *);
 static int CheckMaxHighFieldsHelper(const IntervalTree *, IntervalTreeNode *y, 
                                    const int currentHigh, int match);
 static void IT_CheckAssumptions(const IntervalTree *);
+#endif
 
 /* define a function to find the maximum of two objects. */
 #define ITMax(a, b) ( (a > b) ? a : b )
@@ -838,6 +840,7 @@ IT_enumerate(IntervalTree *it, long low, long high, void *cbd,
 #endif
 }
 
+#ifdef CHECK_INTERVAL_TREE_ASSUMPTIONS
 
 static int
 CheckMaxHighFieldsHelper(const IntervalTree *it, IntervalTreeNode *y, 
@@ -887,3 +890,5 @@ IT_CheckAssumptions(const IntervalTree *it)
     VERIFY(it->root->red == 0);
     CheckMaxHighFields(it, it->root->left);
 }
+#endif
+