From e2b96990877fc4cf27f1b7bbdfd9a55153f76af7 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 8 Aug 2006 07:30:22 +0000 Subject: [PATCH] Don't include unused checker functions if not checking interval tree assumptions (with CHECK_INTERVAL_TREE_ASSUMPTIONS define). svn path=/branches/new-optimizer/; revision=1595 --- libyasm/inttree.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libyasm/inttree.c b/libyasm/inttree.c index 963276d3..caabd0ec 100644 --- a/libyasm/inttree.c +++ b/libyasm/inttree.c @@ -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 +