summaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Support/SmallVector.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-10 19:12:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-10 19:12:52 +0000
commit97bc6c731eabb6212f094302b94f3f0f9534ebdf (patch)
tree471dda8f5419bb81beedeeef3b8975938d7e7340 /contrib/llvm/lib/Support/SmallVector.cpp
parent3adc74c768226112b373d0bcacee73521b0aed2a (diff)
parent85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff)
Notes
Diffstat (limited to 'contrib/llvm/lib/Support/SmallVector.cpp')
-rw-r--r--contrib/llvm/lib/Support/SmallVector.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Support/SmallVector.cpp b/contrib/llvm/lib/Support/SmallVector.cpp
index f9c0e78270c9..b931505bd6a1 100644
--- a/contrib/llvm/lib/Support/SmallVector.cpp
+++ b/contrib/llvm/lib/Support/SmallVector.cpp
@@ -33,6 +33,7 @@ void SmallVectorBase::grow_pod(void *FirstEl, size_t MinSizeInBytes,
// If this wasn't grown from the inline copy, grow the allocated space.
NewElts = realloc(this->BeginX, NewCapacityInBytes);
}
+ assert(NewElts && "Out of memory");
this->EndX = (char*)NewElts+CurSizeBytes;
this->BeginX = NewElts;