diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-06-04 20:25:55 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-06-04 20:25:55 +0000 | 
| commit | 75019ba397782ddaa7f5e1d493a45a73a93fc9ef (patch) | |
| tree | 67e06973c037324398037cb39a81fbf37239f347 | |
| parent | 875779a87a797ff0d380694e36b03d9319e2fc20 (diff) | |
| download | bcm5719-llvm-75019ba397782ddaa7f5e1d493a45a73a93fc9ef.tar.gz bcm5719-llvm-75019ba397782ddaa7f5e1d493a45a73a93fc9ef.zip | |
Don't send random junk to CachedWriter's.  Also remove a cast that could be
problematic when Type does not derive from Value.
llvm-svn: 14022
| -rw-r--r-- | llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp index 98cbe7812b1..25fcc8dfdf1 100644 --- a/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp +++ b/llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp @@ -71,8 +71,10 @@ bool FindUnsafePointerTypes::run(Module &Mod) {            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 @@ void FindUnsafePointerTypes::print(std::ostream &o, const Module *M) const {    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";    }  } | 

