summaryrefslogtreecommitdiffstats
path: root/lib/Support/SmallPtrSet.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-07-13 17:19:57 +0000
commit9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (patch)
tree9de1c5f67a98cd0e73c60838396486c984f63ac2 /lib/Support/SmallPtrSet.cpp
parent1e3dec662ea18131c495db50caccc57f77b7a5fe (diff)
downloadFreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.zip
FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.tar.gz
Update LLVM to r108243.
Diffstat (limited to 'lib/Support/SmallPtrSet.cpp')
-rw-r--r--lib/Support/SmallPtrSet.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp
index 68938fa..504e649 100644
--- a/lib/Support/SmallPtrSet.cpp
+++ b/lib/Support/SmallPtrSet.cpp
@@ -166,10 +166,13 @@ void SmallPtrSetImpl::Grow() {
}
}
-SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) {
+SmallPtrSetImpl::SmallPtrSetImpl(const void **SmallStorage,
+ const SmallPtrSetImpl& that) {
+ SmallArray = SmallStorage;
+
// If we're becoming small, prepare to insert into our stack space
if (that.isSmall()) {
- CurArray = &SmallArray[0];
+ CurArray = SmallArray;
// Otherwise, allocate new heap space (unless we were the same size)
} else {
CurArray = (const void**)malloc(sizeof(void*) * (that.CurArraySize+1));
@@ -197,7 +200,7 @@ void SmallPtrSetImpl::CopyFrom(const SmallPtrSetImpl &RHS) {
if (RHS.isSmall()) {
if (!isSmall())
free(CurArray);
- CurArray = &SmallArray[0];
+ CurArray = SmallArray;
// Otherwise, allocate new heap space (unless we were the same size)
} else if (CurArraySize != RHS.CurArraySize) {
if (isSmall())
OpenPOWER on IntegriCloud