Large Loadable Types: convention block functions / instructions should use the old ABI

This commit is contained in:
Joe Shajrawi
2017-07-25 19:14:47 -07:00
parent f96936368c
commit ddce591dad
4 changed files with 26 additions and 0 deletions

View File

@@ -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;