Fix a bug in smallptrset::erase: in the small case, return true if the
authorChris Lattner <sabre@nondot.org>
Mon, 5 Feb 2007 23:10:31 +0000 (23:10 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 5 Feb 2007 23:10:31 +0000 (23:10 +0000)
element was in the set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33931 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/SmallPtrSet.cpp

index 1eea7272e0194ca729b629eb7fdf2f65bb4eb371..758a952ae420ffd43d5d1227cf22bf3e5ff8ffbc 100644 (file)
@@ -56,7 +56,7 @@ bool SmallPtrSetImpl::erase(void *Ptr) {
         // Clear the end element.
         E[-1] = getEmptyMarker();
         --NumElements;
-        return false;
+        return true;
       }
     
     return false;