}
// Get types from functions.
- SmallVector<std::pair<unsigned, Value *>, 4> MDForInst;
+ SmallVector<std::pair<unsigned, MDNode *>, 4> MDForInst;
for (Module::const_iterator FI = M.begin(), E = M.end(); FI != E; ++FI) {
incorporateType(FI->getType());
// Incorporate types hiding in metadata.
I.getAllMetadataOtherThanDebugLoc(MDForInst);
for (unsigned i = 0, e = MDForInst.size(); i != e; ++i)
- incorporateMDNode(cast<MDNode>(MDForInst[i].second));
+ incorporateMDNode(MDForInst[i].second);
MDForInst.clear();
}
E = M.named_metadata_end(); I != E; ++I) {
const NamedMDNode *NMD = I;
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i)
- incorporateMDNode(NMD->getOperandAsMDNode(i));
+ incorporateMDNode(NMD->getOperand(i));
}
}