[cfe-commits] r84340 - /cfe/trunk/lib/Analysis/LiveVariables.cpp

Daniel Dunbar daniel at zuster.org
Sat Oct 17 11:12:37 PDT 2009


Author: ddunbar
Date: Sat Oct 17 13:12:37 2009
New Revision: 84340

URL: http://llvm.org/viewvc/llvm-project?rev=84340&view=rev
Log:
Use raw_ostream instead of C stdio.

Modified:
    cfe/trunk/lib/Analysis/LiveVariables.cpp

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

==============================================================================
--- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
+++ cfe/trunk/lib/Analysis/LiveVariables.cpp Sat Oct 17 13:12:37 2009
@@ -21,9 +21,7 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Compiler.h"
-
-#include <string.h>
-#include <stdio.h>
+#include "llvm/Support/raw_ostream.h"
 
 using namespace clang;
 
@@ -341,20 +339,19 @@
   for (AnalysisDataTy::decl_iterator I = AD.begin_decl(),
                                      E = AD.end_decl(); I!=E; ++I)
     if (V.getDeclBit(I->second)) {
-      fprintf(stderr, "  %s <", I->first->getIdentifier()->getName());
+      llvm::errs() << "  " << I->first->getIdentifier()->getNameStr() << " <";
       I->first->getLocation().dump(SM);
-      fprintf(stderr, ">\n");
+      llvm::errs() << ">\n";
     }
 }
 
 void LiveVariables::dumpBlockLiveness(SourceManager& M) const {
   for (BlockDataMapTy::iterator I = getBlockDataMap().begin(),
        E = getBlockDataMap().end(); I!=E; ++I) {
-    fprintf(stderr, "\n[ B%d (live variables at block exit) ]\n",
-            I->first->getBlockID());
-
+    llvm::errs() << "\n[ B" << I->first->getBlockID()
+                 << " (live variables at block exit) ]\n";
     dumpLiveness(I->second,M);
   }
 
-  fprintf(stderr,"\n");
+  llvm::errs() << "\n";
 }





More information about the cfe-commits mailing list