diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-09-03 18:19:51 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-09-03 18:19:51 +0000 |
commit | 20aa474f8fbebde588edc101b90e834df28ce4ce (patch) | |
tree | b164de8ce2a8013f8996b831ba998e930f55182c | |
parent | ceca90415f982efe844b37b0cb3e5a228a0b7c57 (diff) | |
download | external_llvm-20aa474f8fbebde588edc101b90e834df28ce4ce.zip external_llvm-20aa474f8fbebde588edc101b90e834df28ce4ce.tar.gz external_llvm-20aa474f8fbebde588edc101b90e834df28ce4ce.tar.bz2 |
Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/IntervalIterator.h | 2 | ||||
-rw-r--r-- | include/llvm/ExecutionEngine/ExecutionEngine.h | 1 | ||||
-rw-r--r-- | lib/Analysis/BasicAliasAnalysis.cpp | 1 | ||||
-rw-r--r-- | lib/Analysis/IntervalPartition.cpp | 3 | ||||
-rw-r--r-- | lib/Analysis/LoadValueNumbering.cpp | 1 | ||||
-rw-r--r-- | lib/Analysis/LoopInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 1 | ||||
-rw-r--r-- | lib/Bytecode/Reader/Reader.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopUnswitch.cpp | 1 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 1 | ||||
-rw-r--r-- | lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 1 | ||||
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
14 files changed, 16 insertions, 6 deletions
diff --git a/include/llvm/Analysis/IntervalIterator.h b/include/llvm/Analysis/IntervalIterator.h index 091959f..6250d94a 100644 --- a/include/llvm/Analysis/IntervalIterator.h +++ b/include/llvm/Analysis/IntervalIterator.h @@ -177,7 +177,7 @@ private: E = GT::child_end(Node); I != E; ++I) ProcessNode(Int, getSourceGraphNode(OrigContainer, *I)); - IntStack.push(make_pair(Int, succ_begin(Int))); + IntStack.push(std::make_pair(Int, succ_begin(Int))); return true; } diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 2e4b3de..884d6b2 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -18,6 +18,7 @@ #include <vector> #include <map> #include <cassert> +#include <string> namespace llvm { diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 76c3a35..4c9c6c9 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -22,6 +22,7 @@ #include "llvm/Pass.h" #include "llvm/Target/TargetData.h" #include "llvm/Support/GetElementPtrTypeIterator.h" +#include <algorithm> using namespace llvm; // Make sure that anything that uses AliasAnalysis pulls in this file... diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp index 9253f72..4f178f4 100644 --- a/lib/Analysis/IntervalPartition.cpp +++ b/lib/Analysis/IntervalPartition.cpp @@ -14,6 +14,7 @@ #include "llvm/Analysis/IntervalIterator.h" #include "llvm/ADT/STLExtras.h" +#include <algorithm> namespace llvm { @@ -26,7 +27,7 @@ X("intervals", "Interval Partition Construction", true); // destroy - Reset state back to before function was analyzed void IntervalPartition::destroy() { - for_each(Intervals.begin(), Intervals.end(), deleter<Interval>); + std::for_each(Intervals.begin(), Intervals.end(), deleter<Interval>); IntervalMap.clear(); RootInterval = 0; } diff --git a/lib/Analysis/LoadValueNumbering.cpp b/lib/Analysis/LoadValueNumbering.cpp index f4a7a97..a8c9d5f 100644 --- a/lib/Analysis/LoadValueNumbering.cpp +++ b/lib/Analysis/LoadValueNumbering.cpp @@ -33,6 +33,7 @@ #include "llvm/Support/CFG.h" #include "llvm/Target/TargetData.h" #include <set> +#include <algorithm> using namespace llvm; namespace { diff --git a/lib/Analysis/LoopInfo.cpp b/lib/Analysis/LoopInfo.cpp index 710f74a..8b9b11a 100644 --- a/lib/Analysis/LoopInfo.cpp +++ b/lib/Analysis/LoopInfo.cpp @@ -33,7 +33,7 @@ X("loops", "Natural Loop Construction", true); // Loop implementation // bool Loop::contains(const BasicBlock *BB) const { - return find(Blocks.begin(), Blocks.end(), BB) != Blocks.end(); + return std::find(Blocks.begin(), Blocks.end(), BB) != Blocks.end(); } bool Loop::isLoopExit(const BasicBlock *BB) const { diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index efe4d92..6a2bc71 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -75,6 +75,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/ADT/Statistic.h" #include <cmath> +#include <algorithm> using namespace llvm; namespace { diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index 39f238c..e821c94 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -26,6 +26,7 @@ #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/ADT/StringExtras.h" #include <sstream> +#include <algorithm> using namespace llvm; namespace { diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 95ed508..e6815a8 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -33,6 +33,7 @@ #include "llvm/ADT/STLExtras.h" #include "VirtRegMap.h" #include <cmath> +#include <algorithm> using namespace llvm; diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 00e4e89..eda105f 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -470,7 +470,7 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur) // is active or inactive to properly update the PhysRegTracker // and the VirtRegMap IntervalPtrs::iterator it; - if ((it = find(active_.begin(), active_.end(), i)) != active_.end()) { + if ((it = std::find(active_.begin(), active_.end(), i)) != active_.end()) { active_.erase(it); if (MRegisterInfo::isPhysicalRegister(i->reg)) { prt_->delRegUse(i->reg); @@ -483,7 +483,7 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur) vrm_->clearVirt(i->reg); } } - else if ((it = find(inactive_.begin(), inactive_.end(), i)) != inactive_.end()) { + else if ((it = std::find(inactive_.begin(), inactive_.end(), i)) != inactive_.end()) { inactive_.erase(it); if (MRegisterInfo::isPhysicalRegister(i->reg)) unhandled_.push(i); diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp index 73a99c2..4493cad 100644 --- a/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -37,6 +37,7 @@ #include "llvm/Transforms/Utils/Local.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" +#include <algorithm> using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 24a2963..ef684e7 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -20,6 +20,7 @@ #include "llvm/Pass.h" #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" +#include <algorithm> using namespace llvm; namespace { diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 81f5cd3..18119ac 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -24,6 +24,7 @@ #include "llvm/Support/CFG.h" #include "llvm/Support/StableBasicBlockNumbering.h" #include "llvm/ADT/StringExtras.h" +#include <algorithm> using namespace llvm; /// isAllocaPromotable - Return true if this alloca is legal for promotion. diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index c932173..419c8a7 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -49,7 +49,7 @@ static bool PropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { // with incompatible values coming in from the two edges! // for (pred_iterator PI = pred_begin(Succ), PE = pred_end(Succ); PI != PE; ++PI) - if (find(BBPreds.begin(), BBPreds.end(), *PI) != BBPreds.end()) { + if (std::find(BBPreds.begin(), BBPreds.end(), *PI) != BBPreds.end()) { // Loop over all of the PHI nodes checking to see if there are // incompatible values coming in. for (BasicBlock::iterator I = Succ->begin(); |