From d6593762d97bf44f3a398dc4fae714a9e20a24b2 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 11 Nov 2012 01:59:48 +0100 Subject: dump goto table only in DEBUG mode --- goto.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'goto.cpp') diff --git a/goto.cpp b/goto.cpp index 6deac96..ddbc69f 100644 --- a/goto.cpp +++ b/goto.cpp @@ -37,7 +37,9 @@ class GotoTable : public RBTree { g_free(name); name = NULL; +#ifdef DEBUG table->dump(); +#endif } }; @@ -112,7 +114,9 @@ public: RBTree::insert(label); } +#ifdef DEBUG dump(); +#endif return existing_pc; } @@ -134,6 +138,7 @@ public: } } +#ifdef DEBUG void dump(void) { @@ -143,6 +148,7 @@ public: g_printf("table[\"%s\"] = %d\n", cur->name, cur->pc); g_printf("---END---\n"); } +#endif }; static GotoTable table; -- cgit v1.2.3