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
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 @@
   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 @@
 }
 
 
-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 @@
 
   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 @@
         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 @@
 // 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 @@
 
   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 @@
 // 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";
 }