[cfe-commits] r55264 - in /cfe/trunk: Driver/ASTConsumers.cpp lib/Analysis/BugReporter.cpp lib/Analysis/GRState.cpp lib/Analysis/RValues.cpp

Chris Lattner sabre at nondot.org
Sat Aug 23 15:23:37 PDT 2008


Author: lattner
Date: Sat Aug 23 17:23:37 2008
New Revision: 55264

URL: http://llvm.org/viewvc/llvm-project?rev=55264&view=rev
Log:
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.

Modified:
    cfe/trunk/Driver/ASTConsumers.cpp
    cfe/trunk/lib/Analysis/BugReporter.cpp
    cfe/trunk/lib/Analysis/GRState.cpp
    cfe/trunk/lib/Analysis/RValues.cpp

Modified: cfe/trunk/Driver/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/ASTConsumers.cpp?rev=55264&r1=55263&r2=55264&view=diff

==============================================================================
--- cfe/trunk/Driver/ASTConsumers.cpp (original)
+++ cfe/trunk/Driver/ASTConsumers.cpp Sat Aug 23 17:23:37 2008
@@ -707,7 +707,7 @@
     }
     
     if (!EmitBitcode)
-      CodeGenModule->print(*Out);
+      *Out << *CodeGenModule.get();
     else
       llvm::WriteBitcodeToFile(CodeGenModule.get(), *Out);
     

Modified: cfe/trunk/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BugReporter.cpp?rev=55264&r1=55263&r2=55264&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Sat Aug 23 17:23:37 2008
@@ -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 " 

Modified: cfe/trunk/lib/Analysis/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRState.cpp?rev=55264&r1=55263&r2=55264&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRState.cpp (original)
+++ cfe/trunk/lib/Analysis/GRState.cpp Sat Aug 23 17:23:37 2008
@@ -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.

Modified: cfe/trunk/lib/Analysis/RValues.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RValues.cpp?rev=55264&r1=55263&r2=55264&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RValues.cpp (original)
+++ cfe/trunk/lib/Analysis/RValues.cpp Sat Aug 23 17:23:37 2008
@@ -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:





More information about the cfe-commits mailing list