diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
commit | 697954c15da58bd8b186dbafdedd8b06db770201 (patch) | |
tree | e119a71f09b5c2513c8c270161ae2a858c6f3b96 /lib/Analysis/IPA | |
parent | 13c4659220bc78a0a3529f4d9e57546e898088e3 (diff) | |
download | external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.zip external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz external_llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2 |
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 8 | ||||
-rw-r--r-- | lib/Analysis/IPA/FindUnsafePointerTypes.cpp | 8 | ||||
-rw-r--r-- | lib/Analysis/IPA/FindUsedTypes.cpp | 10 |
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index d77064c..e48cf7f 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -29,7 +29,7 @@ cfg::CallGraphNode *cfg::CallGraph::getNodeFor(Method *M) { assert(M->getParent() == Mod && "Method not in current module!"); CallGraphNode *New = new CallGraphNode(M); - MethodMap.insert(pair<const Method*, CallGraphNode*>(M, New)); + MethodMap.insert(std::make_pair(M, New)); return New; } @@ -71,7 +71,7 @@ cfg::CallGraph::~CallGraph() { } -void cfg::WriteToOutput(const CallGraphNode *CGN, ostream &o) { +void cfg::WriteToOutput(const CallGraphNode *CGN, std::ostream &o) { if (CGN->getMethod()) o << "Call graph node for method: '" << CGN->getMethod()->getName() <<"'\n"; else @@ -79,10 +79,10 @@ void cfg::WriteToOutput(const CallGraphNode *CGN, ostream &o) { for (unsigned i = 0; i < CGN->size(); ++i) o << " Calls method '" << (*CGN)[i]->getMethod()->getName() << "'\n"; - o << endl; + o << "\n"; } -void cfg::WriteToOutput(const CallGraph &CG, ostream &o) { +void cfg::WriteToOutput(const CallGraph &CG, std::ostream &o) { WriteToOutput(CG.getRoot(), o); for (CallGraph::const_iterator I = CG.begin(), E = CG.end(); I != E; ++I) o << I->second; diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp index 50fb8ea..1058e6e 100644 --- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp +++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp @@ -60,7 +60,7 @@ bool FindUnsafePointerTypes::doPerMethodWork(Method *Meth) { UnsafeTypes.insert((PointerType*)ITy); if (PrintFailures) { - CachedWriter CW(M->getParent(), cerr); + CachedWriter CW(M->getParent(), std::cerr); CW << "FindUnsafePointerTypes: Type '" << ITy << "' marked unsafe in '" << Meth->getName() << "' by:\n" << Inst; } @@ -74,7 +74,7 @@ bool FindUnsafePointerTypes::doPerMethodWork(Method *Meth) { // printResults - Loop over the results of the analysis, printing out unsafe // types. // -void FindUnsafePointerTypes::printResults(const Module *M, ostream &o) { +void FindUnsafePointerTypes::printResults(const Module *M, std::ostream &o) { if (UnsafeTypes.empty()) { o << "SafePointerAccess Analysis: No unsafe types found!\n"; return; @@ -84,9 +84,9 @@ void FindUnsafePointerTypes::printResults(const Module *M, ostream &o) { CW << "SafePointerAccess Analysis: Found these unsafe types:\n"; unsigned Counter = 1; - for (set<PointerType*>::const_iterator I = getUnsafeTypes().begin(), + for (std::set<PointerType*>::const_iterator I = getUnsafeTypes().begin(), E = getUnsafeTypes().end(); I != E; ++I, ++Counter) { - CW << " #" << Counter << ". " << (Value*)*I << endl; + CW << " #" << Counter << ". " << (Value*)*I << "\n"; } } diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index 6f8049a..1d98983 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/lib/Analysis/IPA/FindUsedTypes.cpp @@ -78,15 +78,15 @@ bool FindUsedTypes::doPerMethodWork(Method *m) { // passed in, then the types are printed symbolically if possible, using the // symbol table from the module. // -void FindUsedTypes::printTypes(ostream &o, const Module *M = 0) const { +void FindUsedTypes::printTypes(std::ostream &o, const Module *M = 0) const { o << "Types in use by this module:\n"; if (M) { CachedWriter CW(M, o); - for (set<const Type *>::const_iterator I = UsedTypes.begin(), + for (std::set<const Type *>::const_iterator I = UsedTypes.begin(), E = UsedTypes.end(); I != E; ++I) - CW << " " << *I << endl; + CW << " " << *I << "\n"; } else - for (set<const Type *>::const_iterator I = UsedTypes.begin(), + for (std::set<const Type *>::const_iterator I = UsedTypes.begin(), E = UsedTypes.end(); I != E; ++I) - o << " " << *I << endl; + o << " " << *I << "\n"; } |