Skip to content

Commit fa70442

Browse files
committed
IRGen: Remove suspiciously looking (duplicate) logic
This should be computed by SignatureExpansion in a more correct way. The code here seems suspiciously off in the case we have both a direct return result and one indirect return result.
1 parent d810b0f commit fa70442

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,19 +2845,6 @@ void CallEmission::emitToUnmappedMemory(Address result) {
28452845
SILFunctionConventions FnConv(CurCallee.getSubstFunctionType(),
28462846
IGF.getSILModule());
28472847

2848-
llvm::Type *storageTy = result.getElementType();
2849-
if (FnConv.getNumIndirectSILResults() == 1) {
2850-
for (auto indirectResultType : FnConv.getIndirectSILResultTypes(
2851-
IGF.IGM.getMaximalTypeExpansionContext())) {
2852-
bool isFixedSize =
2853-
isa<FixedTypeInfo>(IGF.IGM.getTypeInfo(indirectResultType));
2854-
storageTy =
2855-
isFixedSize ? IGF.IGM.getStorageType(indirectResultType) : storageTy;
2856-
}
2857-
}
2858-
addIndirectResultAttributes(IGF.IGM, CurCallee.getMutableAttributes(), 0,
2859-
FnConv.getNumIndirectSILResults() <= 1,
2860-
storageTy);
28612848
#ifndef NDEBUG
28622849
LastArgWritten = 0; // appease an assert
28632850
#endif

0 commit comments

Comments
 (0)