Hi Chris, > + // Inform the MachineModuleInfo of the personality for this > landing pad. > + ConstantExpr *CE = dyn_cast<ConstantExpr>(I.getOperand(2)); > + assert(CE && CE->getOpcode() == Instruction::BitCast && > > Please just use cast<> instead of dyn_cast, which guarantees no null > return.
but then you don't get the helpful assertion message. > Please split this out into a helper predicate function. Inside the > loop, please use continue to avoid nesting so much: > > if (!F->isDeclaration()) continue; > ... > if (IID != .. && IID != ..) continue; I deliberately made it ugly because it is a horrible hack - that way you will be motivated to get rid of it by redesigning exception handling! I will prettify it. Ciao, Duncan. _______________________________________________ llvm-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
