Make a bunch of static arrays const.
[oota-llvm.git] / lib / IR / TypeFinder.cpp
index 7accc5bef535f1d6b41d2728883a749041e7eb83..2ea0550ba45639e39718c367a54bf3607e1e8645 100644 (file)
@@ -56,7 +56,7 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
     // First incorporate the arguments.
     for (Function::const_arg_iterator AI = FI->arg_begin(),
            AE = FI->arg_end(); AI != AE; ++AI)
-      incorporateValue(AI);
+      incorporateValue(&*AI);
 
     for (Function::const_iterator BB = FI->begin(), E = FI->end();
          BB != E;++BB)
@@ -85,7 +85,7 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
 
   for (Module::const_named_metadata_iterator I = M.named_metadata_begin(),
          E = M.named_metadata_end(); I != E; ++I) {
-    const NamedMDNode *NMD = I;
+    const NamedMDNode *NMD = &*I;
     for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i)
       incorporateMDNode(NMD->getOperand(i));
   }