* as/z80/z80mch.c: fixed bug #1704376: missing as-z80 errors
[fw/sdcc] / src / SDCCcflow.c
index cb6bf7a6e075a2e3f484e3f6e20ffb0e49de4aa3..505b2d725a1e293c8d11b46947b910c1bf18f47c 100644 (file)
@@ -357,6 +357,24 @@ markNoPath (ebbIndex * ebbi)
       ebbs[i]->noPath = 1;
 }
 
+/*-----------------------------------------------------------------*/
+/* dfNumCompare - used by qsort to sort by dfNumber                */
+/*-----------------------------------------------------------------*/
+int 
+dfNumCompare (const void *a, const void *b)
+{
+  const eBBlock *const *i = a;
+  const eBBlock *const *j = b;
+
+  if ((*i)->dfnum > (*j)->dfnum)
+    return 1;
+
+  if ((*i)->dfnum < (*j)->dfnum)
+    return -1;
+
+  return 0;
+}
+
 /*-----------------------------------------------------------------*/
 /* computeControlFlow - does the control flow computation          */
 /*-----------------------------------------------------------------*/