Author: reid
Date: Mon Jul 16 21:16:12 2007
New Revision: 39952
URL: http://llvm.org/viewvc/llvm-project?rev=39952&view=rev
Log:
Unbreak the build by putting calls to free into the implementation file and
having that implementation file #include <cstdlib>.
Modified:
llvm/trunk/include/llvm/ADT/SmallPtrSet.h
llvm/trunk/lib/Support/SmallPtrSet.cpp
Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=39952&r1=39951&r2=39952&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Mon Jul 16 21:16:12 2007
@@ -67,10 +67,7 @@
CurArray[SmallSize] = 0;
clear();
}
- ~SmallPtrSetImpl() {
- if (!isSmall())
- free(CurArray);
- }
+ ~SmallPtrSetImpl();
bool empty() const { return size() == 0; }
unsigned size() const { return NumElements; }
Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=39952&r1=39951&r2=39952&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SmallPtrSet.cpp (original)
+++ llvm/trunk/lib/Support/SmallPtrSet.cpp Mon Jul 16 21:16:12 2007
@@ -14,6 +14,8 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/MathExtras.h"
+#include <cstdlib>
+
using namespace llvm;
bool SmallPtrSetImpl::insert(void *Ptr) {
@@ -200,3 +202,8 @@
// Copy over the contents from the other set
memcpy(CurArray, RHS.CurArray, sizeof(void*)*(CurArraySize+1));
}
+
+SmallPtrSetImpl::~SmallPtrSetImpl() {
+ if (!isSmall())
+ free(CurArray);
+}
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits