本文整理汇总了C++中Procedure::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Procedure::getName方法的具体用法?C++ Procedure::getName怎么用?C++ Procedure::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Procedure
的用法示例。
在下文中一共展示了Procedure::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Procedure
map<string, Procedure*>* IRWriter::writeProcedures(map<string, Procedure*>* procs){
map<string, Procedure*>::iterator it;
map<string, Procedure*>* newProcs = new map<string, Procedure*>();
//Creation of procedure must be done in two times because function can call other functions
for (it = procs->begin(); it != procs->end(); ++it){
Procedure* proc = (*it).second;
Function* newFunction = NULL;
//Write declaration of the function
if (proc->isExternal()){
newFunction = writer->addFunctionProtosExternal(proc->getFunction());
}else{
newFunction = writer->addFunctionProtosInternal(proc->getFunction());
}
//Create a new procedure
Procedure* newProc = new Procedure(proc->getName(), proc->getExternal(), newFunction);
newProcs->insert(pair<string, Procedure*>(proc->getName(), newProc));
}
//Link body of the procedure
for (it = procs->begin(); it != procs->end(); ++it){
Procedure* proc = (*it).second;
writer->linkProcedureBody(proc->getFunction());
}
return newProcs;
}