Skip to content

Commit d1e3828

Browse files
committed
Remove some unnecessary SILBridging code
1 parent df38313 commit d1e3828

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

include/swift/SIL/SILBridging.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -804,19 +804,9 @@ struct BridgedSILTypeArray {
804804
BridgedSILTypeArray(llvm::ArrayRef<swift::SILType> silTypes)
805805
: typeArray(silTypes) {}
806806

807-
BridgedSILTypeArray(BridgedArrayRef typeArray)
808-
: typeArray(typeArray) {}
809-
810807
llvm::ArrayRef<swift::SILType> unbridged() const {
811808
return typeArray.unbridged<swift::SILType>();
812809
}
813-
814-
llvm::ArrayRef<swift::SILType> getValues(llvm::SmallVectorImpl<swift::SILType> &storage) {
815-
for (unsigned idx = 0; idx < getCount(); ++idx) {
816-
storage.push_back(unbridged()[idx]);
817-
}
818-
return storage;
819-
}
820810
#endif
821811

822812
SwiftInt getCount() const { return SwiftInt(typeArray.Length); }

include/swift/SIL/SILBridgingImpl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,11 +1631,10 @@ BridgedInstruction BridgedBuilder::createIntegerLiteral(BridgedType type, SwiftI
16311631
BridgedInstruction BridgedBuilder::createAllocRef(BridgedType type,
16321632
bool objc, bool canAllocOnStack, bool isBare,
16331633
BridgedSILTypeArray elementTypes, BridgedValueArray elementCountOperands) const {
1634-
llvm::SmallVector<swift::SILType, 16> elementTypesValues;
16351634
llvm::SmallVector<swift::SILValue, 16> elementCountOperandsValues;
16361635
return {unbridged().createAllocRef(
16371636
regularLoc(), type.unbridged(), objc, canAllocOnStack, isBare,
1638-
elementTypes.getValues(elementTypesValues),
1637+
elementTypes.unbridged(),
16391638
elementCountOperands.getValues(elementCountOperandsValues)
16401639
)};
16411640
}

0 commit comments

Comments
 (0)