mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Large Loadable Types: convention block functions / instructions should use the old ABI
This commit is contained in:
@@ -87,6 +87,10 @@ static bool modifiableFunction(CanSILFunctionType funcType) {
|
||||
// ObjC functions should use the old ABI
|
||||
return false;
|
||||
}
|
||||
if (funcType->getLanguage() == SILFunctionLanguage::C) {
|
||||
// C functions should use the old ABI
|
||||
return false;
|
||||
}
|
||||
if (funcType->getRepresentation() ==
|
||||
SILFunctionTypeRepresentation::CFunctionPointer) {
|
||||
// C functions should use the old ABI
|
||||
@@ -565,6 +569,9 @@ static bool modifiableApply(ApplySite applySite, irgen::IRGenModule &Mod) {
|
||||
SILFunctionTypeRepresentation::ObjCMethod) {
|
||||
return false;
|
||||
}
|
||||
if (applySite.getSubstCalleeType()->getLanguage() == SILFunctionLanguage::C) {
|
||||
return false;
|
||||
}
|
||||
if (applySite.getSubstCalleeType()->getRepresentation() ==
|
||||
SILFunctionTypeRepresentation::CFunctionPointer) {
|
||||
return false;
|
||||
@@ -633,6 +640,10 @@ static bool isMethodInstUnmodifiable(MethodInst *instr) {
|
||||
SILFunctionTypeRepresentation::ObjCMethod) {
|
||||
return true;
|
||||
}
|
||||
if (applySite.getSubstCalleeType()->getLanguage() ==
|
||||
SILFunctionLanguage::C) {
|
||||
return true;
|
||||
}
|
||||
if (applySite.getSubstCalleeType()->getRepresentation() ==
|
||||
SILFunctionTypeRepresentation::CFunctionPointer) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user