Merge pull request #83188 from swiftlang/jepa-rebranch

[rebranch] Get rebranch swift-frontend building again
This commit is contained in:
Anthony Latsis
2025-07-19 21:51:16 +01:00
committed by GitHub
49 changed files with 253 additions and 303 deletions

View File

@@ -1764,8 +1764,8 @@ public:
/// path will include 'Foo'. This return value is always owned by \c ImportDecl
/// (which is owned by the AST context), so it can be persisted.
ImportPath getImportPath() const {
return ImportPath({ getTrailingObjects<ImportPath::Element>(),
static_cast<size_t>(Bits.ImportDecl.NumPathElements) });
return ImportPath(getTrailingObjects(
static_cast<size_t>(Bits.ImportDecl.NumPathElements)));
}
/// Retrieves the import path, replacing any module aliases with real names.
@@ -2809,7 +2809,7 @@ public:
private:
MutableArrayRef<PatternBindingEntry> getMutablePatternList() {
// Pattern entries are tail allocated.
return {getTrailingObjects<PatternBindingEntry>(), getNumPatternEntries()};
return getTrailingObjects(getNumPatternEntries());
}
};
@@ -3648,10 +3648,7 @@ public:
/// Retrieve the buffer containing the opaque return type
/// representations that correspond to the opaque generic parameters.
ArrayRef<TypeRepr *> getOpaqueReturnTypeReprs() const {
return {
getTrailingObjects<TypeRepr *>(),
getNumOpaqueReturnTypeReprs()
};
return getTrailingObjects(getNumOpaqueReturnTypeReprs());
}
/// Should the underlying type be visible to clients outside of the module?
@@ -3719,13 +3716,12 @@ public:
Substitutions(substitutions) {
assert(!availabilityContext.empty());
std::uninitialized_copy(availabilityContext.begin(),
availabilityContext.end(),
getTrailingObjects<AvailabilityCondition>());
availabilityContext.end(), getTrailingObjects());
}
public:
ArrayRef<AvailabilityCondition> getAvailability() const {
return {getTrailingObjects<AvailabilityCondition>(), NumAvailabilityConditions};
return getTrailingObjects(NumAvailabilityConditions);
}
SubstitutionMap getSubstitutions() const { return Substitutions; }
@@ -5909,7 +5905,7 @@ private:
inline AccessorDecl *getAccessor(AccessorKind kind) const;
ArrayRef<AccessorDecl *> getAllAccessors() const {
return { getTrailingObjects<AccessorDecl*>(), NumAccessors };
return getTrailingObjects(NumAccessors);
}
void addOpaqueAccessor(AccessorDecl *accessor);
@@ -5918,7 +5914,7 @@ private:
private:
MutableArrayRef<AccessorDecl *> getAccessorsBuffer() {
return { getTrailingObjects<AccessorDecl*>(), NumAccessors };
return getTrailingObjects(NumAccessors);
}
bool registerAccessor(AccessorDecl *accessor, AccessorIndex index);
@@ -8760,7 +8756,7 @@ class EnumCaseDecl final : public Decl,
{
Bits.EnumCaseDecl.NumElements = Elements.size();
std::uninitialized_copy(Elements.begin(), Elements.end(),
getTrailingObjects<EnumElementDecl *>());
getTrailingObjects());
}
SourceLoc getLocFromSource() const { return CaseLoc; }
@@ -8771,8 +8767,8 @@ public:
/// Get the list of elements declared in this case.
ArrayRef<EnumElementDecl *> getElements() const {
return {getTrailingObjects<EnumElementDecl *>(),
static_cast<size_t>(Bits.EnumCaseDecl.NumElements)};
return getTrailingObjects(
static_cast<size_t>(Bits.EnumCaseDecl.NumElements));
}
SourceRange getSourceRange() const;