mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Reverted commits 333390, 333391 and 333394
Build of shared library LLVMDemangle.so fails due to dependency problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -25,13 +25,17 @@ void SmallVectorBase::grow_pod(void *FirstEl, size_t MinSizeInBytes,
|
||||
|
||||
void *NewElts;
|
||||
if (BeginX == FirstEl) {
|
||||
NewElts = safe_malloc(NewCapacityInBytes);
|
||||
NewElts = malloc(NewCapacityInBytes);
|
||||
if (NewElts == nullptr)
|
||||
report_bad_alloc_error("Allocation of SmallVector element failed.");
|
||||
|
||||
// Copy the elements over. No need to run dtors on PODs.
|
||||
memcpy(NewElts, this->BeginX, CurSizeBytes);
|
||||
} else {
|
||||
// If this wasn't grown from the inline copy, grow the allocated space.
|
||||
NewElts = safe_realloc(this->BeginX, NewCapacityInBytes);
|
||||
NewElts = realloc(this->BeginX, NewCapacityInBytes);
|
||||
if (NewElts == nullptr)
|
||||
report_bad_alloc_error("Reallocation of SmallVector element failed.");
|
||||
}
|
||||
|
||||
this->EndX = (char*)NewElts+CurSizeBytes;
|
||||
|
||||
Reference in New Issue
Block a user