From 697954c15da58bd8b186dbafdedd8b06db770201 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 20 Jan 2002 22:54:45 +0000 Subject: 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 --- lib/Transforms/IPO/SimpleStructMutation.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/Transforms/IPO/SimpleStructMutation.cpp') diff --git a/lib/Transforms/IPO/SimpleStructMutation.cpp b/lib/Transforms/IPO/SimpleStructMutation.cpp index d9385453e8..d0b8bb2807 100644 --- a/lib/Transforms/IPO/SimpleStructMutation.cpp +++ b/lib/Transforms/IPO/SimpleStructMutation.cpp @@ -12,9 +12,14 @@ #include "llvm/Analysis/FindUnsafePointerTypes.h" #include "TransformInternals.h" #include +#include +using std::vector; +using std::set; +using std::pair; #include "llvm/Assembly/Writer.h" + // PruneTypes - Given a type Ty, make sure that neither it, or one of its // subtypes, occur in TypesToModify. // @@ -26,7 +31,7 @@ static void PruneTypes(const Type *Ty, set &TypesToModify, // If the element is in TypesToModify, remove it now... if (const StructType *ST = dyn_cast(Ty)) { TypesToModify.erase(ST); // This doesn't fail if the element isn't present - cerr << "Unable to swap type: " << ST << endl; + std::cerr << "Unable to swap type: " << ST << "\n"; } // Remove all types that this type contains as well... do not remove types @@ -69,7 +74,8 @@ static inline void GetTransformation(const StructType *ST, // Build mapping from index to size for (unsigned i = 0; i < NumElements; ++i) - ElList.push_back(make_pair(i, TD.getTypeSize(ST->getElementTypes()[i]))); + ElList.push_back( + std::make_pair(i, TD.getTypeSize(ST->getElementTypes()[i]))); sort(ElList.begin(), ElList.end(), ptr_fun(FirstLess)); @@ -118,14 +124,14 @@ PrebuiltStructMutation::TransformsType set ProcessedTypes; for (set::const_iterator I = UnsafePTys.begin(), E = UnsafePTys.end(); I != E; ++I) { - //cerr << "Pruning type: " << *I << endl; + //cerr << "Pruning type: " << *I << "\n"; PruneTypes(*I, TypesToModify, ProcessedTypes); } // Build up a set of structure types that we are going to modify, and // information describing how to modify them. - map > Transforms; + std::map > Transforms; for (set::iterator I = TypesToModify.begin(), E = TypesToModify.end(); I != E; ++I) { -- cgit v1.2.3