having that implementation file #include <cstdlib>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39952
91177308-0d34-0410-b5e6-
96231b3b80d8
CurArray[SmallSize] = 0;
clear();
}
- ~SmallPtrSetImpl() {
- if (!isSmall())
- free(CurArray);
- }
+ ~SmallPtrSetImpl();
bool empty() const { return size() == 0; }
unsigned size() const { return NumElements; }
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/MathExtras.h"
+#include <cstdlib>
+
using namespace llvm;
bool SmallPtrSetImpl::insert(void *Ptr) {
// Copy over the contents from the other set
memcpy(CurArray, RHS.CurArray, sizeof(void*)*(CurArraySize+1));
}
+
+SmallPtrSetImpl::~SmallPtrSetImpl() {
+ if (!isSmall())
+ free(CurArray);
+}