Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2023-08-06 10:14:39 -07:00
18 changed files with 71 additions and 68 deletions

View File

@@ -1078,15 +1078,6 @@ namespace Lowering {
/// Determine whether the given class will be allocated/deallocated using the
/// Objective-C runtime, i.e., +alloc and -dealloc.
LLVM_LIBRARY_VISIBILITY bool usesObjCAllocator(ClassDecl *theClass);
/// Returns true if SIL/IR lowering for the given declaration should be skipped.
/// A declaration may not require lowering if, for example, it is annotated as
/// unavailable and optimization settings allow it to be omitted.
LLVM_LIBRARY_VISIBILITY bool shouldSkipLowering(const Decl *D);
/// Returns true if SIL/IR lowering for the given declaration should produce
/// a stub that traps at runtime because the code ought to be unreachable.
LLVM_LIBRARY_VISIBILITY bool shouldLowerToUnavailableCodeStub(const Decl *D);
} // namespace Lowering
/// Apply the given function to each ABI member of \c D skipping the members
@@ -1094,7 +1085,7 @@ LLVM_LIBRARY_VISIBILITY bool shouldLowerToUnavailableCodeStub(const Decl *D);
template <typename F>
void forEachMemberToLower(IterableDeclContext *D, F &&f) {
for (auto *member : D->getABIMembers()) {
if (!Lowering::shouldSkipLowering(member))
if (member->isAvailableDuringLowering())
f(member);
}
}