本文整理汇总了C++中mangle::ASTMangler::mangleReabstractionThunkHelper方法的典型用法代码示例。如果您正苦于以下问题:C++ ASTMangler::mangleReabstractionThunkHelper方法的具体用法?C++ ASTMangler::mangleReabstractionThunkHelper怎么用?C++ ASTMangler::mangleReabstractionThunkHelper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mangle::ASTMangler
的用法示例。
在下文中一共展示了ASTMangler::mangleReabstractionThunkHelper方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProfileCounter
SILFunction *SILGenModule::
getOrCreateReabstractionThunk(CanSILFunctionType thunkType,
CanSILFunctionType fromType,
CanSILFunctionType toType,
IsSerialized_t Serialized) {
// The reference to the thunk is likely @noescape, but declarations are always
// escaping.
auto thunkDeclType =
thunkType->getWithExtInfo(thunkType->getExtInfo().withNoEscape(false));
// Mangle the reabstraction thunk.
// Substitute context parameters out of the "from" and "to" types.
auto fromInterfaceType = fromType->mapTypeOutOfContext()
->getCanonicalType();
auto toInterfaceType = toType->mapTypeOutOfContext()
->getCanonicalType();
Mangle::ASTMangler NewMangler;
std::string name = NewMangler.mangleReabstractionThunkHelper(thunkType,
fromInterfaceType, toInterfaceType, M.getSwiftModule());
auto loc = RegularLocation::getAutoGeneratedLocation();
return M.getOrCreateSharedFunction(loc, name, thunkDeclType, IsBare,
IsTransparent, IsSerializable,
ProfileCounter(), IsReabstractionThunk);
}