comparison lib/Support/SmallVector.cpp @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 95c75e76d11b
children 803732b1fca8
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
31 memcpy(NewElts, this->BeginX, CurSizeBytes); 31 memcpy(NewElts, this->BeginX, CurSizeBytes);
32 } else { 32 } else {
33 // If this wasn't grown from the inline copy, grow the allocated space. 33 // If this wasn't grown from the inline copy, grow the allocated space.
34 NewElts = realloc(this->BeginX, NewCapacityInBytes); 34 NewElts = realloc(this->BeginX, NewCapacityInBytes);
35 } 35 }
36 assert(NewElts && "Out of memory");
36 37
37 this->EndX = (char*)NewElts+CurSizeBytes; 38 this->EndX = (char*)NewElts+CurSizeBytes;
38 this->BeginX = NewElts; 39 this->BeginX = NewElts;
39 this->CapacityX = (char*)this->BeginX + NewCapacityInBytes; 40 this->CapacityX = (char*)this->BeginX + NewCapacityInBytes;
40 } 41 }