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 | 24527fd2ae51c9d641d6073fe5efcd12cc3f95d6 (patch) | |
tree | c4de9a836428ad91b3c47b382835dc89b10eee4b | |
parent | 63d64a80bcdab8481f5ea8127a637cb7fd1f1b0d (diff) | |
download | external_llvm-24527fd2ae51c9d641d6073fe5efcd12cc3f95d6.zip external_llvm-24527fd2ae51c9d641d6073fe5efcd12cc3f95d6.tar.gz external_llvm-24527fd2ae51c9d641d6073fe5efcd12cc3f95d6.tar.bz2 |
Don't send random junk to CachedWriter's. Also remove a cast that could be
problematic when Type does not derive from Value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14022 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/IPA/FindUnsafePointerTypes.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp index 98cbe78..25fcc8d 100644 --- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp +++ b/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"; } } |