adjust to changes in various APIs from LLVM.  We can't print
an APInt directly to an ostream now, so add some hacks.  It would
be better to switch all of the bugreport (and friends) stuff over
to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 1e964f0..3206bfd 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -707,7 +707,7 @@
     }
     
     if (!EmitBitcode)
-      CodeGenModule->print(*Out);
+      *Out << *CodeGenModule.get();
     else
       llvm::WriteBitcodeToFile(CodeGenModule.get(), *Out);
     
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index a51f9fb..b9a0d40 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -21,6 +21,7 @@
 #include "clang/AST/Expr.h"
 #include "clang/Analysis/ProgramPoint.h"
 #include "clang/Analysis/PathDiagnostic.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/DenseMap.h"
 #include <sstream>
 
@@ -537,7 +538,8 @@
                   continue;
                 }
                 
-                os << V;
+                llvm::raw_os_ostream OS(os);
+                OS << V;
               }              
               
               os << ":'  at line " 
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index f1e0790..dd9bf69 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -15,7 +15,7 @@
 #include "clang/Analysis/PathSensitive/GRState.h"
 #include "llvm/ADT/SmallSet.h"
 #include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
-
+#include "llvm/Support/raw_ostream.h"
 using namespace clang;
 
 GRStateManager::~GRStateManager() {
@@ -274,9 +274,11 @@
   if (!CE.isEmpty()) {
     Out << nl << sep << "'==' constraints:";
 
-    for (ConstEqTy::iterator I = CE.begin(), E = CE.end(); I!=E; ++I)
-      Out << nl << " $" << I.getKey()
-          << " : "   << *I.getData();
+    for (ConstEqTy::iterator I = CE.begin(), E = CE.end(); I!=E; ++I) {
+      Out << nl << " $" << I.getKey();
+      llvm::raw_os_ostream OS(Out);
+      OS << " : "   << *I.getData();
+    }
   }
 
   // Print != constraints.
diff --git a/lib/Analysis/RValues.cpp b/lib/Analysis/RValues.cpp
index b372ab3..56bb250 100644
--- a/lib/Analysis/RValues.cpp
+++ b/lib/Analysis/RValues.cpp
@@ -352,7 +352,7 @@
   switch (getSubKind()) {  
 
     case nonlval::ConcreteIntKind:
-      Out << cast<nonlval::ConcreteInt>(this)->getValue();
+      Out << cast<nonlval::ConcreteInt>(this)->getValue().getZExtValue();
 
       if (cast<nonlval::ConcreteInt>(this)->getValue().isUnsigned())
         Out << 'U';
@@ -369,7 +369,7 @@
       
       Out << '$' << C.getConstraint().getSymbol() << ' ';
       printOpcode(Out, C.getConstraint().getOpcode());
-      Out << ' ' << C.getConstraint().getInt();
+      Out << ' ' << C.getConstraint().getInt().getZExtValue();
       
       if (C.getConstraint().getInt().isUnsigned())
         Out << 'U';
@@ -395,7 +395,8 @@
   switch (getSubKind()) {        
 
     case lval::ConcreteIntKind:
-      Out << cast<lval::ConcreteInt>(this)->getValue() << " (LVal)";
+      Out << cast<lval::ConcreteInt>(this)->getValue().getZExtValue()
+          << " (LVal)";
       break;
       
     case lval::SymbolValKind: