Use ExtInfo struct to pass around call related info in FunctionType and PolymorphicFunctionType getters.

Swift SVN r6358
This commit is contained in:
Anna Zaks
2013-07-18 22:57:21 +00:00
parent e78c0255a6
commit 92e07c6a54
11 changed files with 123 additions and 161 deletions

View File

@@ -1517,9 +1517,13 @@ Type ModuleFile::getType(TypeID TID) {
return nullptr;
}
auto Info = FunctionType::ExtInfo(callingConvention.getValue(),
thin,
autoClosure,
blockCompatible);
typeOrOffset = FunctionType::get(getType(inputID), getType(resultID),
autoClosure, blockCompatible, thin,
callingConvention.getValue(), ctx);
Info, ctx);
break;
}
@@ -1761,11 +1765,13 @@ Type ModuleFile::getType(TypeID TID) {
}
assert(paramList && "missing generic params for polymorphic function");
auto Info = PolymorphicFunctionType::ExtInfo(callingConvention.getValue(),
thin);
typeOrOffset = PolymorphicFunctionType::get(getType(inputID),
getType(resultID),
paramList,
thin,
callingConvention.getValue(),
Info,
ctx);
break;
}