Skip to content

Commit 8450e37

Browse files
committed
[SIL] Removed SILArgument::isNoImplicitCopy.
The attribute can't be applied to non-function arguments and may cause confusion by being available on them.
1 parent 0659e16 commit 8450e37

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

include/swift/SIL/SILArgument.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ class SILArgument : public ValueBase {
113113
node->getKind() <= SILNodeKind::Last_SILArgument;
114114
}
115115

116-
bool isNoImplicitCopy() const;
117-
118116
unsigned getIndex() const;
119117

120118
/// Return non-null if \p value is a phi.
@@ -408,12 +406,6 @@ inline SILPhiArgument *SILArgument::isTerminatorResult(SILValue value) {
408406
return nullptr;
409407
}
410408

411-
inline bool SILArgument::isNoImplicitCopy() const {
412-
if (auto *fArg = dyn_cast<SILFunctionArgument>(this))
413-
return fArg->isNoImplicitCopy();
414-
return false;
415-
}
416-
417409
inline bool SILArgument::isTerminatorResult() const {
418410
switch (getKind()) {
419411
case SILArgumentKind::SILPhiArgument:

lib/Serialization/SerializeSIL.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,9 @@ void SILSerializer::writeSILBasicBlock(const SILBasicBlock &BB) {
624624
unsigned packedMetadata = 0;
625625
packedMetadata |= unsigned(SA->getType().getCategory()); // 8 bits
626626
packedMetadata |= unsigned(SA->getOwnershipKind()) << 8; // 8 bits
627-
packedMetadata |= unsigned(SA->isNoImplicitCopy()) << 16; // 1 bit
627+
if (auto *SFA = dyn_cast<SILFunctionArgument>(SA)) {
628+
packedMetadata |= unsigned(SFA->isNoImplicitCopy()) << 16; // 1 bit
629+
}
628630
// Used: 17 bits. Free: 15.
629631
//
630632
// TODO: We should be able to shrink the packed metadata of the first two.

0 commit comments

Comments
 (0)