diff options
| author | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
|---|---|---|
| committer | Michael Kruse <llvm-project@meinersbur.de> | 2025-01-03 10:22:51 +0100 |
| commit | 38500d63e14ce340236840f60d356cdefb56a52c (patch) | |
| tree | 17edbec446ce9b50d2f215a483b83afb293a635d /flang/runtime/array-constructor.cpp | |
| parent | 1a3d5daaef7a6a63448a497da3eff7fc9e23df26 (diff) | |
| parent | 27f30029741ecf023baece7b3dde1ff9011ffefc (diff) | |
Merge branch 'main' into users/meinersbur/flang_runtime_split-headersusers/meinersbur/flang_runtime_split-headers
Diffstat (limited to 'flang/runtime/array-constructor.cpp')
| -rw-r--r-- | flang/runtime/array-constructor.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/flang/runtime/array-constructor.cpp b/flang/runtime/array-constructor.cpp index 3d0e969188f2..c6953167f5fb 100644 --- a/flang/runtime/array-constructor.cpp +++ b/flang/runtime/array-constructor.cpp @@ -50,8 +50,8 @@ static RT_API_ATTRS void AllocateOrReallocateVectorIfNeeded( initialAllocationSize(fromElements, to.ElementBytes())}; to.GetDimension(0).SetBounds(1, allocationSize); RTNAME(AllocatableAllocate) - (to, /*asyncId=*/-1, /*hasStat=*/false, /*errMsg=*/nullptr, - vector.sourceFile, vector.sourceLine); + (to, /*hasStat=*/false, /*errMsg=*/nullptr, vector.sourceFile, + vector.sourceLine); to.GetDimension(0).SetBounds(1, fromElements); vector.actualAllocationSize = allocationSize; } else { @@ -59,8 +59,8 @@ static RT_API_ATTRS void AllocateOrReallocateVectorIfNeeded( // first value: there should be no reallocation. RUNTIME_CHECK(terminator, previousToElements >= fromElements); RTNAME(AllocatableAllocate) - (to, /*asyncId=*/-1, /*hasStat=*/false, /*errMsg=*/nullptr, - vector.sourceFile, vector.sourceLine); + (to, /*hasStat=*/false, /*errMsg=*/nullptr, vector.sourceFile, + vector.sourceLine); vector.actualAllocationSize = previousToElements; } } else { @@ -92,13 +92,10 @@ extern "C" { RT_EXT_API_GROUP_BEGIN void RTDEF(InitArrayConstructorVector)(ArrayConstructorVector &vector, - Descriptor &to, bool useValueLengthParameters, int vectorClassSize, - const char *sourceFile, int sourceLine) { + Descriptor &to, bool useValueLengthParameters, const char *sourceFile, + int sourceLine) { Terminator terminator{vector.sourceFile, vector.sourceLine}; - RUNTIME_CHECK(terminator, - to.rank() == 1 && - sizeof(ArrayConstructorVector) <= - static_cast<std::size_t>(vectorClassSize)); + RUNTIME_CHECK(terminator, to.rank() == 1); SubscriptValue actualAllocationSize{ to.IsAllocated() ? static_cast<SubscriptValue>(to.Elements()) : 0}; (void)new (&vector) ArrayConstructorVector{to, /*nextValuePosition=*/0, |
