diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-06-09 19:06:30 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-06-09 19:06:30 +0000 |
commit | 85d8b2bbe386bcfe669575d05b61482d7be07e5d (patch) | |
tree | 1dc5e75ab222a9ead44c699eceafab7a6ca7b310 /lib/Support/SmallVector.cpp | |
parent | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (diff) |
Notes
Diffstat (limited to 'lib/Support/SmallVector.cpp')
-rw-r--r-- | lib/Support/SmallVector.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Support/SmallVector.cpp b/lib/Support/SmallVector.cpp index f9c0e78270c9..b931505bd6a1 100644 --- a/lib/Support/SmallVector.cpp +++ b/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; |