本文整理汇总了C++中AstIf::priorityPragma方法的典型用法代码示例。如果您正苦于以下问题:C++ AstIf::priorityPragma方法的具体用法?C++ AstIf::priorityPragma怎么用?C++ AstIf::priorityPragma使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AstIf
的用法示例。
在下文中一共展示了AstIf::priorityPragma方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visit
virtual void visit(AstNodeIf* nodep) {
const ColorSet& colors = m_ifColorp->colors(nodep);
typedef vl_unordered_map<uint32_t, AstNodeIf*> CloneMap;
CloneMap clones;
for (ColorSet::const_iterator color = colors.begin();
color != colors.end(); ++color) {
// Clone this if into its set of split blocks
AstSplitPlaceholder* if_placeholderp = makePlaceholderp();
AstSplitPlaceholder* else_placeholderp = makePlaceholderp();
AstIf* clonep =
new AstIf(nodep->fileline(),
nodep->condp()->cloneTree(true),
if_placeholderp,
else_placeholderp);
AstIf* origp = VN_CAST(nodep, If);
if (origp) {
// Preserve pragmas from unique if's
// so assertions work properly
clonep->uniquePragma(origp->uniquePragma());
clonep->unique0Pragma(origp->unique0Pragma());
clonep->priorityPragma(origp->priorityPragma());
}
clones[*color] = clonep;
m_addAfter[*color]->addNextHere(clonep);
m_addAfter[*color] = if_placeholderp;
}
iterateAndNextNull(nodep->ifsp());
for (ColorSet::const_iterator color = colors.begin();
color != colors.end(); ++color) {
m_addAfter[*color] = clones[*color]->elsesp();
}
iterateAndNextNull(nodep->elsesp());
for (ColorSet::const_iterator color = colors.begin();
color != colors.end(); ++color) {
m_addAfter[*color] = clones[*color];
}
}