aboutsummaryrefslogtreecommitdiff
path: root/gcc/sbitmap.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@gcc.gnu.org>2007-06-11 18:02:15 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2007-06-11 18:02:15 +0000
commit6fb5fa3cbc0d78cf9f4ff7cac5e1d8af1e65c5bb (patch)
treefdb9e9f8a0700a2713dc690fed1a2cf20dae8392 /gcc/sbitmap.c
parenta91d32a4a65d54cccf639a1541417e39cb7b7deb (diff)
downloadgcc-6fb5fa3cbc0d78cf9f4ff7cac5e1d8af1e65c5bb.zip
gcc-6fb5fa3cbc0d78cf9f4ff7cac5e1d8af1e65c5bb.tar.gz
gcc-6fb5fa3cbc0d78cf9f4ff7cac5e1d8af1e65c5bb.tar.bz2
Merge dataflow branch into mainline
From-SVN: r125624
Diffstat (limited to 'gcc/sbitmap.c')
-rw-r--r--gcc/sbitmap.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/sbitmap.c b/gcc/sbitmap.c
index a25bff4b..65a4686 100644
--- a/gcc/sbitmap.c
+++ b/gcc/sbitmap.c
@@ -1,5 +1,6 @@
/* Simple bitmaps.
- Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -262,6 +263,19 @@ sbitmap_equal (sbitmap a, sbitmap b)
return !memcmp (a->elms, b->elms, sizeof (SBITMAP_ELT_TYPE) * a->size);
}
+/* Return true if the bitmap is empty. */
+
+bool
+sbitmap_empty_p (sbitmap bmap)
+{
+ unsigned int i;
+ for (i=0; i<bmap->size; i++)
+ if (bmap->elms[i])
+ return false;
+
+ return true;
+}
+
/* Zero all elements in a bitmap. */
void