File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
lib/SILOptimizer/Analysis Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 14
14
#include " swift/SIL/SILInstruction.h"
15
15
#include " swift/AST/ASTContext.h"
16
16
#include " swift/AST/Decl.h"
17
+ #include " swift/AST/Module.h"
18
+ #include " swift/AST/LazyResolver.h"
17
19
#include " swift/SIL/SILModule.h"
18
20
#include " llvm/Support/Debug.h"
19
21
@@ -71,10 +73,15 @@ bool DestructorAnalysis::isSafeType(CanType Ty) {
71
73
return cacheResult (Ty, true );
72
74
73
75
// Check the stored properties.
74
- for (auto SP : Struct->getStoredProperties ())
76
+ for (auto SP : Struct->getStoredProperties ()) {
77
+ // FIXME: Remove this once getInterfaceType() is a request.
78
+ if (!SP->hasInterfaceType ()) {
79
+ ASTContext &Ctx = Mod->getSwiftModule ()->getASTContext ();
80
+ Ctx.getLazyResolver ()->resolveDeclSignature (SP);
81
+ }
75
82
if (!isSafeType (SP->getInterfaceType ()->getCanonicalType ()))
76
83
return cacheResult (Ty, false );
77
-
84
+ }
78
85
return cacheResult (Ty, true );
79
86
}
80
87
You can’t perform that action at this time.
0 commit comments