[llvm-commits] CVS: llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Jun 4 15:30:02 PDT 2004


Changes in directory llvm/lib/Analysis/IPA:

FindUnsafePointerTypes.cpp updated: 1.23 -> 1.24

---
Log message:

Don't send random junk to CachedWriter's.  Also remove a cast that could be
problematic when Type does not derive from Value.


---
Diffs of the changes:  (+6 -4)

Index: llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
diff -u llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp:1.23 llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp:1.24
--- llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp:1.23	Wed Apr 28 13:52:43 2004
+++ llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp	Fri Jun  4 15:25:55 2004
@@ -71,8 +71,10 @@
 
           if (PrintFailures) {
             CachedWriter CW(F->getParent(), std::cerr);
-            CW << "FindUnsafePointerTypes: Type '" << ITy
-               << "' marked unsafe in '" << F->getName() << "' by:\n" << *I;
+            std::cerr << "FindUnsafePointerTypes: Type '";
+            CW << ITy;
+            std::cerr << "' marked unsafe in '" << F->getName() << "' by:\n";
+            CW << *I;
           }
         }
     }
@@ -93,13 +95,13 @@
 
   CachedWriter CW(M, o);
 
-  CW << "SafePointerAccess Analysis: Found these unsafe types:\n";
+  o << "SafePointerAccess Analysis: Found these unsafe types:\n";
   unsigned Counter = 1;
   for (std::set<PointerType*>::const_iterator I = getUnsafeTypes().begin(), 
          E = getUnsafeTypes().end(); I != E; ++I, ++Counter) {
     
     o << " #" << Counter << ". ";
-    CW << (Value*)*I << "\n";
+    CW << (Type*)*I << "\n";
   }
 }
 





More information about the llvm-commits mailing list