File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -611,19 +611,23 @@ EffectsKind SILDeclRef::getEffectsAttribute() const {
611
611
}
612
612
613
613
bool SILDeclRef::isForeignToNativeThunk () const {
614
+ // If this isn't a native entry-point, it's not a foreign-to-native thunk.
615
+ if (isForeign)
616
+ return false ;
617
+
614
618
// Non-decl entry points are never natively foreign, so they would never
615
619
// have a foreign-to-native thunk.
616
620
if (!hasDecl ())
617
621
return false ;
618
622
if (requiresForeignToNativeThunk (getDecl ()))
619
- return !isForeign ;
623
+ return true ;
620
624
// ObjC initializing constructors and factories are foreign.
621
625
// We emit a special native allocating constructor though.
622
626
if (isa<ConstructorDecl>(getDecl ())
623
627
&& (kind == Kind::Initializer
624
628
|| cast<ConstructorDecl>(getDecl ())->isFactoryInit ())
625
629
&& getDecl ()->hasClangNode ())
626
- return !isForeign ;
630
+ return true ;
627
631
return false ;
628
632
}
629
633
You can’t perform that action at this time.
0 commit comments