void MakeDispatcherPass::ConvertCmp(Function& function) { typedef std::vector< Instruction * > InstList; InstList insts; for (Function::iterator BB = function.begin(), bbE = function.end(); BB != bbE; ++BB) { for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) { if (isa< CmpInst >(I)) { insts.push_back(I); } if (isa< BranchInst >(I)) { BasicBlock::iterator save = I; BranchInst* branchInst = dynamic_cast< BranchInst *>(&*I); if (branchInst->isConditional() && !insts.empty()) { Value* valbranch = NULL; valbranch = branchInst->getCondition(); ShowType(dynamic_cast<CmpInst*>(insts[0])); CreateInt3(BB, I); I++; save->eraseFromParent(); insts.pop_back(); continue; } } I++; } } }
void IO_MGR::Save( PCB_FILE_T aFileType, const wxString& aFileName, BOARD* aBoard, const PROPERTIES* aProperties ) { // release the PLUGIN even if an exception is thrown. PLUGIN::RELEASER pi( PluginFind( aFileType ) ); if( (PLUGIN*) pi ) // test pi->plugin { pi->Save( aFileName, aBoard, aProperties ); // virtual return; } THROW_IO_ERROR( wxString::Format( FMT_NOTFOUND, ShowType( aFileType ).GetData() ) ); }
BOOL CParmStatDlg::OnInitDialog() { CParamDlg::OnInitDialog(); SetWindowText("Statistic Functions"); InitFunc(); SetFunc(); ShowType(); ShowHint(); EnableFunc(); EnableType(); EnableHint(); EnableValues(); m_pRun->SetValues(this); UpdateData(FALSE); return TRUE; }
void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) const { wxString path = m_SheetPath.PathHumanReadable(); out << "<netItem ndx=\"" << ndx << '"' << " type=\"" << ShowType( m_Type ) << '"' << " netCode=\"" << GetNet() << '"' << " sheet=\"" << TO_UTF8( path ) << '"' << ">\n"; out << " <start " << m_Start << "/> <end " << m_End << "/>\n"; if( !m_Label.IsEmpty() ) out << " <label>" << m_Label.mb_str() << "</label>\n"; out << " <sheetpath>" << m_SheetPath.PathHumanReadable().mb_str() << "</sheetpath>\n"; switch( m_Type ) { case NET_PIN: /* GetRef() needs to be const out << " <refOfComp>" << GetComponentParent()->GetRef(&m_SheetPath).mb_str() << "</refOfComp>\n"; */ if( m_Comp ) m_Comp->Show( 1, out ); break; default: // not all the m_Comp classes have working Show functions. ; } /* was segfault-ing if( m_Comp ) m_Comp->Show( 1, out ); // labels may not have good Show() funcs? else out << " m_Comp==NULL\n"; */ out << "</netItem>\n"; }