summaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-04 20:25:55 +0000
committerChris Lattner <sabre@nondot.org>2004-06-04 20:25:55 +0000
commit24527fd2ae51c9d641d6073fe5efcd12cc3f95d6 (patch)
treec4de9a836428ad91b3c47b382835dc89b10eee4b /lib/Analysis/IPA/FindUnsafePointerTypes.cpp
parent63d64a80bcdab8481f5ea8127a637cb7fd1f1b0d (diff)
downloadllvm-24527fd2ae51c9d641d6073fe5efcd12cc3f95d6.tar.gz
llvm-24527fd2ae51c9d641d6073fe5efcd12cc3f95d6.tar.bz2
llvm-24527fd2ae51c9d641d6073fe5efcd12cc3f95d6.tar.xz
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
Diffstat (limited to 'lib/Analysis/IPA/FindUnsafePointerTypes.cpp')
-rw-r--r--lib/Analysis/IPA/FindUnsafePointerTypes.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
index 98cbe7812b..25fcc8dfdf 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";
}
}