Skip to content

Commit 530b177

Browse files
committed
Reduce change noise
1 parent d1a4cd6 commit 530b177

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

flang-rt/include/flang-rt/array-constructor.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ struct ArrayConstructorVector {
4444
unsigned char useValueLengthParameters_ : 1;
4545
};
4646

47+
static_assert(sizeof(Fortran::runtime::ArrayConstructorVector) <=
48+
MaxArrayConstructorVectorSizeInBytes,
49+
"ABI requires sizeof(ArrayConstructorVector) to be smaller than "
50+
"MaxArrayConstructorVectorSizeInBytes");
51+
static_assert(alignof(Fortran::runtime::ArrayConstructorVector) <=
52+
MaxArrayConstructorVectorAlignInBytes,
53+
"ABI requires alignof(ArrayConstructorVector) to be smaller than "
54+
"MaxArrayConstructorVectorAlignInBytes");
4755

4856
} // namespace Fortran::runtime
4957
#endif /* FLANG_RT_ARRAY_CONSTRUCTOR_H_ */

flang-rt/lib/flang_rt/allocatable.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
1717
#include "flang/Runtime/assign.h"
1818

19-
using Fortran::common::TypeCategory;
20-
21-
22-
2319
namespace Fortran::runtime {
2420
extern "C" {
2521
RT_EXT_API_GROUP_BEGIN

flang-rt/lib/flang_rt/type-code.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "flang-rt/type-code.h"
10-
#include <cstdint>
1110

1211
namespace Fortran::runtime {
1312

flang-rt/lib/flang_rt/type-info.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,10 @@ RT_API_ATTRS std::size_t Component::SizeInBytes(
8585
return GetElementByteSize(instance) * GetElements(instance);
8686
} else if (category() == TypeCategory::Derived) {
8787
const DerivedType *type{derivedType()};
88-
auto bytes {Descriptor::SizeInBytes(
89-
rank_, true, type ? type->LenParameters() : 0)};
90-
assert(bytes <= MaxDescriptorSizeInBytes( rank_, true, type ? type->LenParameters() : 0));
91-
return bytes;
88+
return Descriptor::SizeInBytes(
89+
rank_, true, type ? type->LenParameters() : 0);
9290
} else {
93-
auto bytes{ Descriptor::SizeInBytes(rank_)};
94-
assert(bytes <= MaxDescriptorSizeInBytes( rank_));
95-
return bytes;
91+
return Descriptor::SizeInBytes(rank_);
9692
}
9793
}
9894

flang/include/flang/Runtime/allocatable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "flang/Runtime/entry-names.h"
1616

1717
namespace Fortran::runtime {
18+
1819
extern "C" {
1920

2021
// Initializes the descriptor for an allocatable of intrinsic or derived type.

0 commit comments

Comments
 (0)