From 5060fd0fa35a900f0e9f10b4fa95cd735369a2b8 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 17 Jul 2007 02:16:12 +0000 Subject: Unbreak the build by putting calls to free into the implementation file and having that implementation file #include . llvm-svn: 39952 --- llvm/lib/Support/SmallPtrSet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/SmallPtrSet.cpp b/llvm/lib/Support/SmallPtrSet.cpp index 5c672375c6b..eb33c1541b0 100644 --- a/llvm/lib/Support/SmallPtrSet.cpp +++ b/llvm/lib/Support/SmallPtrSet.cpp @@ -14,6 +14,8 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/MathExtras.h" +#include + using namespace llvm; bool SmallPtrSetImpl::insert(void *Ptr) { @@ -200,3 +202,8 @@ void SmallPtrSetImpl::CopyFrom(const SmallPtrSetImpl &RHS) { // Copy over the contents from the other set memcpy(CurArray, RHS.CurArray, sizeof(void*)*(CurArraySize+1)); } + +SmallPtrSetImpl::~SmallPtrSetImpl() { + if (!isSmall()) + free(CurArray); +} -- cgit v1.2.3