Fix/strengthen verification of llvm.dbg.declare
[oota-llvm.git] / lib / VMCore / AsmWriter.cpp
index c0aeaf93c8845174e38c429e28985caf7f57275d..c9f3849c9253b154c6232f1095b482bca20774f6 100644 (file)
@@ -2062,7 +2062,7 @@ void Value::print(raw_ostream &ROS, AssemblyAnnotationWriter *AAW) const {
     else
       W.printAlias(cast<GlobalAlias>(GV));
   } else if (const MDNode *N = dyn_cast<MDNode>(this)) {
-    Function *F = N->getFunction();
+    const Function *F = N->getFunction();
     SlotTracker SlotTable(F);
     AssemblyWriter W(OS, SlotTable, F ? getModuleFromVal(F) : 0, AAW);
     W.printMDNodeBody(N);