summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis
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 /include/llvm/Analysis
parent13c4659220bc78a0a3529f4d9e57546e898088e3 (diff)
downloadllvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.gz
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.bz2
llvm-697954c15da58bd8b186dbafdedd8b06db770201.tar.xz
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 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/CallGraph.h8
-rw-r--r--include/llvm/Analysis/Dominators.h23
-rw-r--r--include/llvm/Analysis/FindUnsafePointerTypes.h6
-rw-r--r--include/llvm/Analysis/FindUsedTypes.h6
-rw-r--r--include/llvm/Analysis/InstForest.h34
-rw-r--r--include/llvm/Analysis/Interval.h12
-rw-r--r--include/llvm/Analysis/IntervalIterator.h6
-rw-r--r--include/llvm/Analysis/IntervalPartition.h6
-rw-r--r--include/llvm/Analysis/LiveVar/LiveVarMap.h10
-rw-r--r--include/llvm/Analysis/LiveVar/LiveVarSet.h2
-rw-r--r--include/llvm/Analysis/LiveVar/ValueSet.h29
-rw-r--r--include/llvm/Analysis/LoopDepth.h4
-rw-r--r--include/llvm/Analysis/LoopInfo.h18
-rw-r--r--include/llvm/Analysis/ModuleAnalyzer.h2
-rw-r--r--include/llvm/Analysis/SlotCalculator.h8
-rw-r--r--include/llvm/Analysis/Verifier.h4
-rw-r--r--include/llvm/Analysis/Writer.h47
17 files changed, 108 insertions, 117 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h
index 8365a4f397..f5b020269c 100644
--- a/include/llvm/Analysis/CallGraph.h
+++ b/include/llvm/Analysis/CallGraph.h
@@ -27,12 +27,12 @@ namespace cfg {
class CallGraph;
class CallGraphNode {
Method *Meth;
- vector<CallGraphNode*> CalledMethods;
+ std::vector<CallGraphNode*> CalledMethods;
CallGraphNode(const CallGraphNode &); // Do not implement
public:
- typedef vector<CallGraphNode*>::iterator iterator;
- typedef vector<CallGraphNode*>::const_iterator const_iterator;
+ typedef std::vector<CallGraphNode*>::iterator iterator;
+ typedef std::vector<CallGraphNode*>::const_iterator const_iterator;
// getMethod - Return the method that this call graph node represents...
Method *getMethod() const { return Meth; }
@@ -65,7 +65,7 @@ private: // Stuff to construct the node, used by CallGraph
class CallGraph {
Module *Mod; // The module this call graph represents
- typedef map<const Method *, CallGraphNode *> MethodMapTy;
+ typedef std::map<const Method *, CallGraphNode *> MethodMapTy;
MethodMapTy MethodMap; // Map from a method to its node
CallGraphNode *Root;
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h
index 6639b64a05..c018eafe2c 100644
--- a/include/llvm/Analysis/Dominators.h
+++ b/include/llvm/Analysis/Dominators.h
@@ -47,8 +47,9 @@ public:
//
class DominatorSet : public DominatorBase {
public:
- typedef set<const BasicBlock*> DomSetType; // Dom set for a bb
- typedef map<const BasicBlock *, DomSetType> DomSetMapType; // Map of dom sets
+ typedef std::set<const BasicBlock*> DomSetType; // Dom set for a bb
+ // Map of dom sets
+ typedef std::map<const BasicBlock*, DomSetType> DomSetMapType;
private:
DomSetMapType Doms;
@@ -91,7 +92,7 @@ public:
// method.
//
class ImmediateDominators : public DominatorBase {
- map<const BasicBlock*, const BasicBlock*> IDoms;
+ std::map<const BasicBlock*, const BasicBlock*> IDoms;
void calcIDoms(const DominatorSet &DS);
public:
@@ -104,7 +105,7 @@ public:
}
// Accessor interface:
- typedef map<const BasicBlock*, const BasicBlock*> IDomMapType;
+ typedef std::map<const BasicBlock*, const BasicBlock*> IDomMapType;
typedef IDomMapType::const_iterator const_iterator;
inline const_iterator begin() const { return IDoms.begin(); }
inline const_iterator end() const { return IDoms.end(); }
@@ -114,7 +115,7 @@ public:
// node returns null, because it does not have an immediate dominator.
//
inline const BasicBlock *operator[](const BasicBlock *BB) const {
- map<const BasicBlock*, const BasicBlock*>::const_iterator I =
+ std::map<const BasicBlock*, const BasicBlock*>::const_iterator I =
IDoms.find(BB);
return I != IDoms.end() ? I->second : 0;
}
@@ -130,18 +131,18 @@ class DominatorTree : public DominatorBase {
public:
typedef Node2 Node;
private:
- map<const BasicBlock*, Node*> Nodes;
+ std::map<const BasicBlock*, Node*> Nodes;
void calculate(const DominatorSet &DS);
- typedef map<const BasicBlock*, Node*> NodeMapType;
+ typedef std::map<const BasicBlock*, Node*> NodeMapType;
public:
- class Node2 : public vector<Node*> {
+ class Node2 : public std::vector<Node*> {
friend class DominatorTree;
const BasicBlock *TheNode;
Node2 * const IDom;
public:
inline const BasicBlock *getNode() const { return TheNode; }
inline Node2 *getIDom() const { return IDom; }
- inline const vector<Node*> &getChildren() const { return *this; }
+ inline const std::vector<Node*> &getChildren() const { return *this; }
// dominates - Returns true iff this dominates N. Note that this is not a
// constant time operation!
@@ -181,8 +182,8 @@ public:
//
class DominanceFrontier : public DominatorBase {
public:
- typedef set<const BasicBlock*> DomSetType; // Dom set for a bb
- typedef map<const BasicBlock *, DomSetType> DomSetMapType; // Map of dom sets
+ typedef std::set<const BasicBlock*> DomSetType; // Dom set for a bb
+ typedef std::map<const BasicBlock*, DomSetType> DomSetMapType; // Dom set map
private:
DomSetMapType Frontiers;
const DomSetType &calcDomFrontier(const DominatorTree &DT,
diff --git a/include/llvm/Analysis/FindUnsafePointerTypes.h b/include/llvm/Analysis/FindUnsafePointerTypes.h
index 3f66f3308b..c52ca2fbbb 100644
--- a/include/llvm/Analysis/FindUnsafePointerTypes.h
+++ b/include/llvm/Analysis/FindUnsafePointerTypes.h
@@ -24,11 +24,11 @@ class PointerType;
struct FindUnsafePointerTypes : public Pass {
// UnsafeTypes - Set of types that are not safe to transform.
- set<PointerType*> UnsafeTypes;
+ std::set<PointerType*> UnsafeTypes;
public:
// Accessor for underlying type set...
- inline const set<PointerType*> &getUnsafeTypes() const {
+ inline const std::set<PointerType*> &getUnsafeTypes() const {
return UnsafeTypes;
}
@@ -41,7 +41,7 @@ public:
// printResults - Loop over the results of the analysis, printing out unsafe
// types.
//
- void printResults(const Module *Mod, ostream &o);
+ void printResults(const Module *Mod, std::ostream &o);
};
#endif
diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h
index aa00e5f8a8..956901dfaa 100644
--- a/include/llvm/Analysis/FindUsedTypes.h
+++ b/include/llvm/Analysis/FindUsedTypes.h
@@ -12,7 +12,7 @@
class SymbolTable;
class FindUsedTypes : public Pass {
- set<const Type *> UsedTypes;
+ std::set<const Type *> UsedTypes;
bool IncludeSymbolTables;
public:
@@ -25,13 +25,13 @@ public:
// getTypes - After the pass has been run, return the set containing all of
// the types used in the module.
//
- inline const set<const Type *> &getTypes() const { return UsedTypes; }
+ inline const std::set<const Type *> &getTypes() const { return UsedTypes; }
// Print the types found in the module. If the optional Module parameter is
// passed in, then the types are printed symbolically if possible, using the
// symbol table from the module.
//
- void printTypes(ostream &o, const Module *M = 0) const;
+ void printTypes(std::ostream &o, const Module *M = 0) const;
private:
// IncorporateType - Incorporate one type and all of its subtypes into the
diff --git a/include/llvm/Analysis/InstForest.h b/include/llvm/Analysis/InstForest.h
index e8ab0aae08..13eb54fa52 100644
--- a/include/llvm/Analysis/InstForest.h
+++ b/include/llvm/Analysis/InstForest.h
@@ -35,10 +35,12 @@ template<class Payload> class InstForest;
//
template<class Payload>
class InstTreeNode :
- public Tree<InstTreeNode<Payload>, pair<pair<Value*, char>, Payload> > {
+ public Tree<InstTreeNode<Payload>,
+ std::pair<std::pair<Value*, char>, Payload> > {
friend class InstForest<Payload>;
- typedef Tree<InstTreeNode<Payload>, pair<pair<Value*, char>, Payload> > super;
+ typedef Tree<InstTreeNode<Payload>,
+ std::pair<std::pair<Value*, char>, Payload> > super;
// Constants used for the node type value
enum NodeTypeTy {
@@ -104,15 +106,15 @@ public:
public:
// print - Called by operator<< below...
- void print(ostream &o, unsigned Indent) const {
- o << string(Indent*2, ' ');
+ void print(std::ostream &o, unsigned Indent) const {
+ o << std::string(Indent*2, ' ');
switch (getNodeType()) {
case ConstNode : o << "Constant : "; break;
- case BasicBlockNode : o << "BasicBlock : " << getValue()->getName() << endl;
+ case BasicBlockNode : o << "BasicBlock : " << getValue()->getName() << "\n";
return;
case InstructionNode: o << "Instruction: "; break;
case TemporaryNode : o << "Temporary : "; break;
- default: o << "UNKNOWN NODE TYPE: " << getNodeType() << endl; abort();
+ default: o << "UNKNOWN NODE TYPE: " << getNodeType() << "\n"; abort();
}
o << getValue();
@@ -124,7 +126,8 @@ public:
};
template<class Payload>
-inline ostream &operator<<(ostream &o, const InstTreeNode<Payload> *N) {
+inline std::ostream &operator<<(std::ostream &o,
+ const InstTreeNode<Payload> *N) {
N->print(o, 0); return o;
}
@@ -137,16 +140,16 @@ inline ostream &operator<<(ostream &o, const InstTreeNode<Payload> *N) {
// guaranteed to be an instruction node. The constructor builds the forest.
//
template<class Payload>
-class InstForest : public vector<InstTreeNode<Payload> *> {
+class InstForest : public std::vector<InstTreeNode<Payload> *> {
friend class InstTreeNode<Payload>;
// InstMap - Map contains entries for ALL instructions in the method and the
// InstTreeNode that they correspond to.
//
- map<Instruction*, InstTreeNode<Payload> *> InstMap;
+ std::map<Instruction*, InstTreeNode<Payload> *> InstMap;
void addInstMapping(Instruction *I, InstTreeNode<Payload> *IN) {
- InstMap.insert(make_pair(I, IN));
+ InstMap.insert(std::make_pair(I, IN));
}
void removeInstFromRootList(Instruction *I) {
@@ -180,26 +183,27 @@ public:
// the parent pointer can be used to find the root of the tree.
//
inline InstTreeNode<Payload> *getInstNode(Instruction *Inst) {
- map<Instruction*, InstTreeNode<Payload> *>::iterator I = InstMap.find(Inst);
+ std::map<Instruction*, InstTreeNode<Payload> *>::iterator I =
+ InstMap.find(Inst);
if (I != InstMap.end()) return I->second;
return 0;
}
inline const InstTreeNode<Payload> *getInstNode(const Instruction *Inst)const{
- map<Instruction*, InstTreeNode<Payload>*>::const_iterator I =
+ std::map<Instruction*, InstTreeNode<Payload>*>::const_iterator I =
InstMap.find(Inst);
if (I != InstMap.end()) return I->second;
return 0;
}
// print - Called by operator<< below...
- void print(ostream &out) const {
+ void print(std::ostream &out) const {
for (const_iterator I = begin(), E = end(); I != E; ++I)
out << *I;
}
};
template<class Payload>
-inline ostream &operator<<(ostream &o, const InstForest<Payload> &IF) {
+inline std::ostream &operator<<(std::ostream &o, const InstForest<Payload> &IF){
IF.print(o); return o;
}
@@ -254,7 +258,7 @@ InstTreeNode<Payload>::InstTreeNode(InstForest<Payload> &IF, Value *V,
// Otherwise, we are an internal instruction node. We must process our
// uses and add them as children of this node.
//
- vector<InstTreeNode*> Children;
+ std::vector<InstTreeNode*> Children;
// Make sure that the forest knows about us!
IF.addInstMapping(I, this);
diff --git a/include/llvm/Analysis/Interval.h b/include/llvm/Analysis/Interval.h
index db9d67c15a..18f3a88c7e 100644
--- a/include/llvm/Analysis/Interval.h
+++ b/include/llvm/Analysis/Interval.h
@@ -31,9 +31,9 @@ class Interval {
//
BasicBlock *HeaderNode;
public:
- typedef vector<BasicBlock*>::iterator succ_iterator;
- typedef vector<BasicBlock*>::iterator pred_iterator;
- typedef vector<BasicBlock*>::iterator node_iterator;
+ typedef std::vector<BasicBlock*>::iterator succ_iterator;
+ typedef std::vector<BasicBlock*>::iterator pred_iterator;
+ typedef std::vector<BasicBlock*>::iterator node_iterator;
inline Interval(BasicBlock *Header) : HeaderNode(Header) {
Nodes.push_back(Header);
@@ -46,18 +46,18 @@ public:
// Nodes - The basic blocks in this interval.
//
- vector<BasicBlock*> Nodes;
+ std::vector<BasicBlock*> Nodes;
// Successors - List of BasicBlocks that are reachable directly from nodes in
// this interval, but are not in the interval themselves.
// These nodes neccesarily must be header nodes for other intervals.
//
- vector<BasicBlock*> Successors;
+ std::vector<BasicBlock*> Successors;
// Predecessors - List of BasicBlocks that have this Interval's header block
// as one of their successors.
//
- vector<BasicBlock*> Predecessors;
+ std::vector<BasicBlock*> Predecessors;
// contains - Find out if a basic block is in this interval
inline bool contains(BasicBlock *BB) const {
diff --git a/include/llvm/Analysis/IntervalIterator.h b/include/llvm/Analysis/IntervalIterator.h
index 454c0ca07e..52d2cc807d 100644
--- a/include/llvm/Analysis/IntervalIterator.h
+++ b/include/llvm/Analysis/IntervalIterator.h
@@ -79,8 +79,8 @@ inline void addNodeToInterval(Interval *Int, Interval *I) {
template<class NodeTy, class OrigContainer_t>
class IntervalIterator {
- stack<pair<Interval*, typename Interval::succ_iterator> > IntStack;
- set<BasicBlock*> Visited;
+ std::stack<std::pair<Interval*, typename Interval::succ_iterator> > IntStack;
+ std::set<BasicBlock*> Visited;
OrigContainer_t *OrigContainer;
bool IOwnMem; // If True, delete intervals when done with them
// See file header for conditions of use
@@ -88,7 +88,7 @@ public:
typedef BasicBlock* _BB;
typedef IntervalIterator<NodeTy, OrigContainer_t> _Self;
- typedef forward_iterator_tag iterator_category;
+ typedef std::forward_iterator_tag iterator_category;
IntervalIterator() {} // End iterator, empty stack
IntervalIterator(Method *M, bool OwnMemory) : IOwnMem(OwnMemory) {
diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h
index 494ccd2097..f05408b022 100644
--- a/include/llvm/Analysis/IntervalPartition.h
+++ b/include/llvm/Analysis/IntervalPartition.h
@@ -31,11 +31,11 @@ namespace cfg {
// BasicBlock is a (possibly nonexistent) loop with a "tail" of non looping
// nodes following it.
//
-class IntervalPartition : public vector<Interval*> {
- typedef map<BasicBlock*, Interval*> IntervalMapTy;
+class IntervalPartition : public std::vector<Interval*> {
+ typedef std::map<BasicBlock*, Interval*> IntervalMapTy;
IntervalMapTy IntervalMap;
- typedef vector<Interval*> IntervalListTy;
+ typedef std::vector<Interval*> IntervalListTy;
Interval *RootInterval;
public:
diff --git a/include/llvm/Analysis/LiveVar/LiveVarMap.h b/include/llvm/Analysis/LiveVar/LiveVarMap.h
index bc00d4f281..44b3bbb7a4 100644
--- a/include/llvm/Analysis/LiveVar/LiveVarMap.h
+++ b/include/llvm/Analysis/LiveVar/LiveVarMap.h
@@ -12,7 +12,7 @@
#ifndef LIVE_VAR_MAP_H
#define LIVE_VAR_MAP_H
-#include <hash_map>
+#include <ext/hash_map>
class BasicBlock;
class BBLiveVar;
@@ -34,11 +34,11 @@ struct hashFuncBB { // sturcture containing the hash function for BB
-typedef hash_map<const BasicBlock *,
- BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
+typedef std::hash_map<const BasicBlock *,
+ BBLiveVar *, hashFuncBB > BBToBBLiveVarMapType;
-typedef hash_map<const MachineInstr *, const LiveVarSet *,
- hashFuncMInst> MInstToLiveVarSetMapType;
+typedef std::hash_map<const MachineInstr *, const LiveVarSet *,
+ hashFuncMInst> MInstToLiveVarSetMapType;
#endif
diff --git a/include/llvm/Analysis/LiveVar/LiveVarSet.h b/include/llvm/Analysis/LiveVar/LiveVarSet.h
index 17524fccd3..d7761cfc20 100644
--- a/include/llvm/Analysis/LiveVar/LiveVarSet.h
+++ b/include/llvm/Analysis/LiveVar/LiveVarSet.h
@@ -8,7 +8,7 @@
#ifndef LIVE_VAR_SET_H
#define LIVE_VAR_SET_H
-#include "ValueSet.h"
+#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "llvm/Instruction.h"
#include "llvm/Type.h"
diff --git a/include/llvm/Analysis/LiveVar/ValueSet.h b/include/llvm/Analysis/LiveVar/ValueSet.h
index ee6aa15aab..d17e0229a1 100644
--- a/include/llvm/Analysis/LiveVar/ValueSet.h
+++ b/include/llvm/Analysis/LiveVar/ValueSet.h
@@ -1,4 +1,4 @@
-/* Title: ValueSet.h
+/* Title: ValueSet.h -*- C++ -*-
Author: Ruchira Sasanka
Date: Jun 30, 01
Purpose: Contains a mathematical set of Values. LiveVarSet is derived from
@@ -8,24 +8,9 @@
#ifndef VALUE_SET_H
#define VALUE_SET_H
-#include <stdlib.h>
-
-#include <hash_set>
-#include <algorithm>
-//#include <fstream>
-#include <iostream>
-
-#include "llvm/Value.h"
-
-
-//------------------------ Support functions ---------------------------------
-
-struct hashFuncValue { // sturcture containing the hash func
- inline size_t operator () (const Value *const val) const
- { return (size_t) val; }
-};
-
-
+class Value;
+#include "Support/HashExtras.h"
+#include <ext/hash_set>
//------------------- Class Definition for ValueSet --------------------------
@@ -33,12 +18,8 @@ void printValue( const Value *const v); // func to print a Value
-class ValueSet : public hash_set<const Value *, hashFuncValue >
-{
-
+class ValueSet : public std::hash_set<const Value *> {
public:
- ValueSet(); // constructor
-
inline void add(const Value *const val)
{ assert( val ); insert(val);} // for adding a live variable to set
diff --git a/include/llvm/Analysis/LoopDepth.h b/include/llvm/Analysis/LoopDepth.h
index 76a590c31f..89068d6bb7 100644
--- a/include/llvm/Analysis/LoopDepth.h
+++ b/include/llvm/Analysis/LoopDepth.h
@@ -14,14 +14,14 @@ class Method;
namespace cfg {class Interval; }
class LoopDepthCalculator {
- map<const BasicBlock*, unsigned> LoopDepth;
+ std::map<const BasicBlock*, unsigned> LoopDepth;
inline void AddBB(const BasicBlock *BB); // Increment count for this block
inline void ProcessInterval(cfg::Interval *I);
public:
LoopDepthCalculator(Method *M);
inline unsigned getLoopDepth(const BasicBlock *BB) const {
- map<const BasicBlock*, unsigned>::const_iterator I = LoopDepth.find(BB);
+ std::map<const BasicBlock*,unsigned>::const_iterator I = LoopDepth.find(BB);
return I != LoopDepth.end() ? I->second : 0;
}
};
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 3a20226520..10fcfe9f30 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -25,8 +25,8 @@ namespace cfg {
//
class Loop {
Loop *ParentLoop;
- vector<const BasicBlock *> Blocks; // First entry is the header node
- vector<Loop*> SubLoops; // Loops contained entirely within this one
+ std::vector<const BasicBlock *> Blocks; // First entry is the header node
+ std::vector<Loop*> SubLoops; // Loops contained entirely within this one
unsigned LoopDepth; // Nesting depth of this loop
Loop(const Loop &); // DO NOT IMPLEMENT
@@ -40,8 +40,10 @@ public:
bool contains(const BasicBlock *BB) const;
// getSubLoops - Return the loops contained entirely within this loop
- inline const vector<Loop*> &getSubLoops() const { return SubLoops; }
- inline const vector<const BasicBlock*> &getBlocks() const { return Blocks; }
+ inline const std::vector<Loop*> &getSubLoops() const { return SubLoops; }
+ inline const std::vector<const BasicBlock*> &getBlocks() const {
+ return Blocks;
+ }
private:
friend class LoopInfo;
@@ -62,19 +64,19 @@ private:
//
class LoopInfo {
// BBMap - Mapping of basic blocks to the inner most loop they occur in
- map<const BasicBlock *, Loop*> BBMap;
- vector<Loop*> TopLevelLoops;
+ std::map<const BasicBlock *, Loop*> BBMap;
+ std::vector<Loop*> TopLevelLoops;
public:
// LoopInfo ctor - Calculate the natural loop information for a CFG
LoopInfo(const DominatorSet &DS);
- const vector<Loop*> &getTopLevelLoops() const { return TopLevelLoops; }
+ const std::vector<Loop*> &getTopLevelLoops() const { return TopLevelLoops; }
// getLoopFor - Return the inner most loop that BB lives in. If a basic block
// is in no loop (for example the entry node), null is returned.
//
const Loop *getLoopFor(const BasicBlock *BB) const {
- map<const BasicBlock *, Loop*>::const_iterator I = BBMap.find(BB);
+ std::map<const BasicBlock *, Loop*>::const_iterator I = BBMap.find(BB);
return I != BBMap.end() ? I->second : 0;
}
inline const Loop *operator[](const BasicBlock *BB) const {
diff --git a/include/llvm/Analysis/ModuleAnalyzer.h b/include/llvm/Analysis/ModuleAnalyzer.h
index a0baa8a7dd..8493becc64 100644
--- a/include/llvm/Analysis/ModuleAnalyzer.h
+++ b/include/llvm/Analysis/ModuleAnalyzer.h
@@ -78,7 +78,7 @@ protected:
virtual bool processInstruction(const Instruction *I) { return false; }
private:
- bool handleType(set<const Type *> &TypeSet, const Type *T);
+ bool handleType(std::set<const Type *> &TypeSet, const Type *T);
};
#endif
diff --git a/include/llvm/Analysis/SlotCalculator.h b/include/llvm/Analysis/SlotCalculator.h
index c7b3149054..95282447a5 100644
--- a/include/llvm/Analysis/SlotCalculator.h
+++ b/include/llvm/Analysis/SlotCalculator.h
@@ -23,14 +23,14 @@ class SlotCalculator {
const Module *TheModule;
bool IgnoreNamedNodes; // Shall we not count named nodes?
- typedef vector<const Value*> TypePlane;
- vector<TypePlane> Table;
- map<const Value *, unsigned> NodeMap;
+ typedef std::vector<const Value*> TypePlane;
+ std::vector<TypePlane> Table;
+ std::map<const Value *, unsigned> NodeMap;
// ModuleLevel - Used to keep track of which values belong to the module,
// and which values belong to the currently incorporated method.
//
- vector<unsigned> ModuleLevel;
+ std::vector<unsigned> ModuleLevel;
public:
SlotCalculator(const Module *M, bool IgnoreNamed);
diff --git a/include/llvm/Analysis/Verifier.h b/include/llvm/Analysis/Verifier.h
index 2feadca779..eb125396c5 100644
--- a/include/llvm/Analysis/Verifier.h
+++ b/include/llvm/Analysis/Verifier.h
@@ -22,7 +22,7 @@ class Method;
// error messages corresponding to the problem are added to the errorMsgs
// vectors, and a value of true is returned.
//
-bool verify(const Module *M, vector<string> &ErrorMsgs);
-bool verify(const Method *M, vector<string> &ErrorMsgs);
+bool verify(const Module *M, std::vector<std::string> &ErrorMsgs);
+bool verify(const Method *M, std::vector<std::string> &ErrorMsgs);
#endif
diff --git a/include/llvm/Analysis/Writer.h b/include/llvm/Analysis/Writer.h
index 2b43231872..daaf65729e 100644
--- a/include/llvm/Analysis/Writer.h
+++ b/include/llvm/Analysis/Writer.h
@@ -16,13 +16,14 @@ namespace cfg {
class Interval;
class IntervalPartition;
- void WriteToOutput(const Interval *I, ostream &o);
- inline ostream &operator <<(ostream &o, const Interval *I) {
+ void WriteToOutput(const Interval *I, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const Interval *I) {
WriteToOutput(I, o); return o;
}
- void WriteToOutput(const IntervalPartition &IP, ostream &o);
- inline ostream &operator <<(ostream &o, const IntervalPartition &IP) {
+ void WriteToOutput(const IntervalPartition &IP, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o,
+ const IntervalPartition &IP) {
WriteToOutput(IP, o); return o;
}
@@ -32,23 +33,25 @@ namespace cfg {
class DominatorTree;
class DominanceFrontier;
- void WriteToOutput(const DominatorSet &, ostream &o);
- inline ostream &operator <<(ostream &o, const DominatorSet &DS) {
+ void WriteToOutput(const DominatorSet &, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const DominatorSet &DS) {
WriteToOutput(DS, o); return o;
}
- void WriteToOutput(const ImmediateDominators &, ostream &o);
- inline ostream &operator <<(ostream &o, const ImmediateDominators &ID) {
+ void WriteToOutput(const ImmediateDominators &, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o,
+ const ImmediateDominators &ID) {
WriteToOutput(ID, o); return o;
}
- void WriteToOutput(const DominatorTree &, ostream &o);
- inline ostream &operator <<(ostream &o, const DominatorTree &DT) {
+ void WriteToOutput(const DominatorTree &, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const DominatorTree &DT) {
WriteToOutput(DT, o); return o;
}
- void WriteToOutput(const DominanceFrontier &, ostream &o);
- inline ostream &operator <<(ostream &o, const DominanceFrontier &DF) {
+ void WriteToOutput(const DominanceFrontier &, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o,
+ const DominanceFrontier &DF) {
WriteToOutput(DF, o); return o;
}
@@ -56,13 +59,13 @@ namespace cfg {
class CallGraph;
class CallGraphNode;
- void WriteToOutput(const CallGraph &, ostream &o);
- inline ostream &operator <<(ostream &o, const CallGraph &CG) {
+ void WriteToOutput(const CallGraph &, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const CallGraph &CG) {
WriteToOutput(CG, o); return o;
}
- void WriteToOutput(const CallGraphNode *, ostream &o);
- inline ostream &operator <<(ostream &o, const CallGraphNode *CGN) {
+ void WriteToOutput(const CallGraphNode *, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const CallGraphNode *CGN) {
WriteToOutput(CGN, o); return o;
}
@@ -70,21 +73,21 @@ namespace cfg {
class Loop;
class LoopInfo;
- void WriteToOutput(const LoopInfo &, ostream &o);
- inline ostream &operator <<(ostream &o, const LoopInfo &LI) {
+ void WriteToOutput(const LoopInfo &, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const LoopInfo &LI) {
WriteToOutput(LI, o); return o;
}
- void WriteToOutput(const Loop *, ostream &o);
- inline ostream &operator <<(ostream &o, const Loop *L) {
+ void WriteToOutput(const Loop *, std::ostream &o);
+ inline std::ostream &operator <<(std::ostream &o, const Loop *L) {
WriteToOutput(L, o); return o;
}
} // End namespace CFG
class InductionVariable;
-void WriteToOutput(const InductionVariable &, ostream &o);
-inline ostream &operator <<(ostream &o, const InductionVariable &IV) {
+void WriteToOutput(const InductionVariable &, std::ostream &o);
+inline std::ostream &operator <<(std::ostream &o, const InductionVariable &IV) {
WriteToOutput(IV, o); return o;
}