本文整理汇总了C++中Attr::setInherited方法的典型用法代码示例。如果您正苦于以下问题:C++ Attr::setInherited方法的具体用法?C++ Attr::setInherited怎么用?C++ Attr::setInherited使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attr
的用法示例。
在下文中一共展示了Attr::setInherited方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
//.........这里部分代码省略.........
}
case Attr::FormatArg: {
unsigned FormatIdx = Record[Idx++];
New = ::new (*Context) FormatArgAttr(FormatIdx);
break;
}
case Attr::Sentinel: {
int sentinel = Record[Idx++];
int nullPos = Record[Idx++];
New = ::new (*Context) SentinelAttr(sentinel, nullPos);
break;
}
SIMPLE_ATTR(GNUInline);
SIMPLE_ATTR(Hiding);
case Attr::IBActionKind:
New = ::new (*Context) IBActionAttr();
break;
case Attr::IBOutletKind:
New = ::new (*Context) IBOutletAttr();
break;
SIMPLE_ATTR(Malloc);
SIMPLE_ATTR(NoDebug);
SIMPLE_ATTR(NoInline);
SIMPLE_ATTR(NoReturn);
SIMPLE_ATTR(NoThrow);
case Attr::NonNull: {
unsigned Size = Record[Idx++];
llvm::SmallVector<unsigned, 16> ArgNums;
ArgNums.insert(ArgNums.end(), &Record[Idx], &Record[Idx] + Size);
Idx += Size;
New = ::new (*Context) NonNullAttr(*Context, ArgNums.data(), Size);
break;
}
case Attr::ReqdWorkGroupSize: {
unsigned X = Record[Idx++];
unsigned Y = Record[Idx++];
unsigned Z = Record[Idx++];
New = ::new (*Context) ReqdWorkGroupSizeAttr(X, Y, Z);
break;
}
SIMPLE_ATTR(ObjCException);
SIMPLE_ATTR(ObjCNSObject);
SIMPLE_ATTR(CFReturnsNotRetained);
SIMPLE_ATTR(CFReturnsRetained);
SIMPLE_ATTR(NSReturnsNotRetained);
SIMPLE_ATTR(NSReturnsRetained);
SIMPLE_ATTR(Overloadable);
SIMPLE_ATTR(Override);
SIMPLE_ATTR(Packed);
UNSIGNED_ATTR(PragmaPack);
SIMPLE_ATTR(Pure);
UNSIGNED_ATTR(Regparm);
STRING_ATTR(Section);
SIMPLE_ATTR(StdCall);
SIMPLE_ATTR(TransparentUnion);
SIMPLE_ATTR(Unavailable);
SIMPLE_ATTR(Unused);
SIMPLE_ATTR(Used);
case Attr::Visibility:
New = ::new (*Context) VisibilityAttr(
(VisibilityAttr::VisibilityTypes)Record[Idx++]);
break;
SIMPLE_ATTR(WarnUnusedResult);
SIMPLE_ATTR(Weak);
SIMPLE_ATTR(WeakRef);
SIMPLE_ATTR(WeakImport);
}
assert(New && "Unable to decode attribute?");
New->setInherited(IsInherited);
New->setNext(Attrs);
Attrs = New;
}
#undef UNSIGNED_ATTR
#undef STRING_ATTR
#undef SIMPLE_ATTR
// The list of attributes was built backwards. Reverse the list
// before returning it.
Attr *PrevAttr = 0, *NextAttr = 0;
while (Attrs) {
NextAttr = Attrs->getNext();
Attrs->setNext(PrevAttr);
PrevAttr = Attrs;
Attrs = NextAttr;
}
return PrevAttr;
}