mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Default DeclAttributes::getAttributes to skipping invalid attributes.
This matches the singular 'getAttribute', and all three current users of this API were passing 'false' here anyway. No functionality change.
This commit is contained in:
@@ -376,11 +376,10 @@ SILFunction *SILModule::getOrCreateFunction(SILLocation loc,
|
||||
F->setClangNodeOwner(decl);
|
||||
|
||||
auto Attrs = decl->getAttrs();
|
||||
for (auto *A : Attrs.getAttributes<SemanticsAttr, false /*AllowInvalid*/>())
|
||||
for (auto *A : Attrs.getAttributes<SemanticsAttr>())
|
||||
F->addSemanticsAttr(cast<SemanticsAttr>(A)->Value);
|
||||
|
||||
for (auto *A :
|
||||
Attrs.getAttributes<SpecializeAttr, false /*AllowInvalid*/>()) {
|
||||
for (auto *A : Attrs.getAttributes<SpecializeAttr>()) {
|
||||
auto *SA = cast<SpecializeAttr>(A);
|
||||
auto kind = SA->getSpecializationKind() ==
|
||||
SpecializeAttr::SpecializationKind::Full
|
||||
|
||||
Reference in New Issue
Block a user