mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Test fixes and review feedback
This commit is contained in:
@@ -1123,27 +1123,28 @@ public:
|
||||
};
|
||||
|
||||
class BuiltinFixedArrayTypeRef final : public TypeRef {
|
||||
intptr_t Size;
|
||||
const TypeRef *Size;
|
||||
const TypeRef *Element;
|
||||
|
||||
static TypeRefID Profile(const intptr_t &Size, const TypeRef *Element) {
|
||||
static TypeRefID Profile(const TypeRef *Size, const TypeRef *Element) {
|
||||
TypeRefID ID;
|
||||
ID.addInteger((uint64_t)Size);
|
||||
ID.addPointer(Size);
|
||||
ID.addPointer(Element);
|
||||
return ID;
|
||||
}
|
||||
|
||||
public:
|
||||
BuiltinFixedArrayTypeRef(const intptr_t &Size, const TypeRef *Element)
|
||||
BuiltinFixedArrayTypeRef(const TypeRef *Size, const TypeRef *Element)
|
||||
: TypeRef(TypeRefKind::BuiltinFixedArray), Size(Size), Element(Element) {}
|
||||
|
||||
template <typename Allocator>
|
||||
static const BuiltinFixedArrayTypeRef *create(Allocator &A, intptr_t Size,
|
||||
static const BuiltinFixedArrayTypeRef *create(Allocator &A,
|
||||
const TypeRef *Size,
|
||||
const TypeRef *Element) {
|
||||
FIND_OR_CREATE_TYPEREF(A, BuiltinFixedArrayTypeRef, Size, Element);
|
||||
}
|
||||
|
||||
const intptr_t &getSize() const {
|
||||
const TypeRef *getSizeType() const {
|
||||
return Size;
|
||||
}
|
||||
|
||||
|
||||
@@ -938,9 +938,7 @@ public:
|
||||
|
||||
const TypeRef *createBuiltinFixedArrayType(const TypeRef *size,
|
||||
const TypeRef *element) {
|
||||
auto integer = cast<IntegerTypeRef>(size);
|
||||
return BuiltinFixedArrayTypeRef::create(*this, integer->getValue(),
|
||||
element);
|
||||
return BuiltinFixedArrayTypeRef::create(*this, size, element);
|
||||
}
|
||||
|
||||
// Construct a bound generic type ref along with the parent type info
|
||||
|
||||
Reference in New Issue
Block a user