Extend the ValuesAtScope cache to cover all expressions, not just
[oota-llvm.git] / lib / Analysis / DbgInfoPrinter.cpp
index 6c549e6345e649a17bab1c893b40c9ff96d0ac85..8063476bb5e6e0b239fbaa71236d8ed0f2705677 100644 (file)
@@ -90,7 +90,7 @@ void PrintDbgInfo::printStopPoint(const DbgStopPointInst *DSI) {
 }
 
 void PrintDbgInfo::printFuncStart(const DbgFuncStartInst *FS) {
-  DISubprogram Subprogram(cast<GlobalVariable>(FS->getSubprogram()));
+  DISubprogram Subprogram(FS->getSubprogram());
   std::string Res1, Res2;
   Out << "; fully qualified function name: " << Subprogram.getDisplayName(Res1)
       << " return type: " << Subprogram.getReturnTypeName(Res2)
@@ -152,7 +152,7 @@ bool PrintDbgInfo::runOnFunction(Function &F) {
           Printed = true;
         }
 
-        Out << *i;
+        Out << *i << '\n';
         printVariableDeclaration(i);
 
         if (const User *U = dyn_cast<User>(i)) {