aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/SimpleStructMutation.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
committerChris Lattner <sabre@nondot.org>2002-01-20 22:54:45 +0000
commit697954c15da58bd8b186dbafdedd8b06db770201 (patch)
treee119a71f09b5c2513c8c270161ae2a858c6f3b96 /lib/Transforms/IPO/SimpleStructMutation.cpp
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
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/Transforms/IPO/SimpleStructMutation.cpp')
-rw-r--r--lib/Transforms/IPO/SimpleStructMutation.cpp14
1 files changed, 10 insertions, 4 deletions
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 <algorithm>
+#include <iostream>
+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<const StructType*> &TypesToModify,
// If the element is in TypesToModify, remove it now...
if (const StructType *ST = dyn_cast<StructType>(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<const Type*> ProcessedTypes;
for (set<PointerType*>::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<const StructType*, vector<int> > Transforms;
+ std::map<const StructType*, vector<int> > Transforms;
for (set<const StructType*>::iterator I = TypesToModify.begin(),
E = TypesToModify.end(); I != E; ++I) {