[mips][microMIPS] Implement LBU16, LHU16, LW16, SB16, SH16 and SW16 instructions
[oota-llvm.git] / lib / IR / TypeFinder.cpp
index 3aae4e69ec1f3f56c23659d5213682a2724eaef6..6796075bfc20f1d26b1c42ecbd2e72637c226804 100644 (file)
@@ -40,7 +40,7 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
   }
 
   // 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());
 
@@ -71,7 +71,7 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
         // 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();
       }
@@ -81,7 +81,7 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
          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));
   }
 }