- for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) {
- if (ConstantExpr *CE = dyn_cast<ConstantExpr>(InitList->getOperand(i)))
- if (CE->getOpcode() == Instruction::BitCast)
- if (Function *F = dyn_cast<Function>(CE->getOperand(0)))
- UsedFunctions.insert(F);
- }
+ for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
+ if (Function *F =
+ dyn_cast<Function>(InitList->getOperand(i)->stripPointerCasts()))
+ UsedFunctions.insert(F);