File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 26
26
#include " swift/AST/IRGenOptions.h"
27
27
#include " swift/ABI/MetadataValues.h"
28
28
#include " swift/IRGen/ValueWitness.h"
29
+ #include " swift/SIL/TypeLowering.h"
29
30
30
31
#include " Callee.h"
31
32
#include " Explosion.h"
@@ -719,7 +720,7 @@ void irgen::emitDestroyArrayCall(IRGenFunction &IGF,
719
720
Address object,
720
721
llvm::Value *count) {
721
722
// If T is a trivial/POD type, nothing needs to be done.
722
- if (T. getObjectType ( ).isTrivial (IGF. getSILModule () ))
723
+ if (IGF. IGM . getTypeLowering (T ).isTrivial ())
723
724
return ;
724
725
725
726
auto metadata = IGF.emitTypeMetadataRefForLayout (T);
@@ -994,7 +995,7 @@ void irgen::emitDestroyCall(IRGenFunction &IGF,
994
995
SILType T,
995
996
Address object) {
996
997
// If T is a trivial/POD type, nothing needs to be done.
997
- if (T. getObjectType ( ).isTrivial (IGF. getSILModule () ))
998
+ if (IGF. IGM . getTypeLowering (T ).isTrivial ())
998
999
return ;
999
1000
llvm::Value *metadata;
1000
1001
auto fn = IGF.emitValueWitnessFunctionRef (T, metadata,
Original file line number Diff line number Diff line change @@ -1446,6 +1446,13 @@ SILType IRGenModule::getLoweredType(Type subst) const {
1446
1446
ResilienceExpansion::Minimal);
1447
1447
}
1448
1448
1449
+ // / Return the SIL-lowering of the given type.
1450
+ const Lowering::TypeLowering &IRGenModule::getTypeLowering (SILType type) const {
1451
+ // FIXME: Expansion
1452
+ return getSILTypes ().getTypeLowering (type,
1453
+ ResilienceExpansion::Minimal);
1454
+ }
1455
+
1449
1456
bool IRGenModule::isTypeABIAccessible (SILType type) const {
1450
1457
// FIXME: Expansion
1451
1458
return getSILModule ().isTypeABIAccessible (type,
Original file line number Diff line number Diff line change @@ -749,6 +749,7 @@ class IRGenModule {
749
749
750
750
SILType getLoweredType (AbstractionPattern orig, Type subst) const ;
751
751
SILType getLoweredType (Type subst) const ;
752
+ const Lowering::TypeLowering &getTypeLowering (SILType type) const ;
752
753
bool isTypeABIAccessible (SILType type) const ;
753
754
754
755
const TypeInfo &getTypeInfoForUnlowered (AbstractionPattern orig,
You can’t perform that action at this time.
0 commit comments