Fixes to make LLVM compile with vc7.1.
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Fri, 3 Sep 2004 18:19:51 +0000 (18:19 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Fri, 3 Sep 2004 18:19:51 +0000 (18:19 +0000)
Patch contributed by Paolo Invernizzi!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
include/llvm/Analysis/IntervalIterator.h
include/llvm/ExecutionEngine/ExecutionEngine.h
lib/Analysis/BasicAliasAnalysis.cpp
lib/Analysis/IntervalPartition.cpp
lib/Analysis/LoadValueNumbering.cpp
lib/Analysis/LoopInfo.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Bytecode/Reader/Reader.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/RegAllocLinearScan.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
lib/Transforms/Utils/SimplifyCFG.cpp

index 091959f25fa0e43915e1f53e394281597f5649da..6250d94a96c4289a841f7fbea523daf3c78b9edb 100644 (file)
@@ -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;
   }
   
index 2e4b3deda6ac5ae9aa6684fead278676fd4c7ad9..884d6b2df7ba94a277849db3bace7843b5540b2c 100644 (file)
@@ -18,6 +18,7 @@
 #include <vector>
 #include <map>
 #include <cassert>
+#include <string>
 
 namespace llvm {
 
index 76c3a35c410f857dce3b7ab8f1f770af4170a70f..4c9c6c9753289dd42baee16fcbaba72487fe1ae2 100644 (file)
@@ -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...
index 9253f721ab1e0495b375baf4e04ac9377cdd1916..4f178f4f64f8c2bf21c1e1a9af32913a58a8fc3f 100644 (file)
@@ -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;
 }
index f4a7a978d6604553037dab15b2dcba03184a7597..a8c9d5f231cdf7af2e98dc064ab8efa9e5cfde77 100644 (file)
@@ -33,6 +33,7 @@
 #include "llvm/Support/CFG.h"
 #include "llvm/Target/TargetData.h"
 #include <set>
+#include <algorithm>
 using namespace llvm;
 
 namespace {
index 710f74afe2d5d01cd72c1936310d033482d7c66e..8b9b11aadc14870063fa47a6b56faabe128bdbe0 100644 (file)
@@ -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 {
index efe4d92bff8688bf5956427cafaf8f550cc417f3..6a2bc714bbebf466b28fe23207211fa48b4dd16a 100644 (file)
@@ -75,6 +75,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/ADT/Statistic.h"
 #include <cmath>
+#include <algorithm>
 using namespace llvm;
 
 namespace {
index 39f238c9869c5faf5213faf64480f1ffcc42cc4b..e821c946e16f93f1cdecfadbaf392d42e00c43e4 100644 (file)
@@ -26,6 +26,7 @@
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 #include "llvm/ADT/StringExtras.h"
 #include <sstream>
+#include <algorithm>
 using namespace llvm;
 
 namespace {
index 95ed508fcb3e68e4dcee22ad0eccd7026f333259..e6815a8f3b5b1874cdeca204f7fc00389a9696b9 100644 (file)
@@ -33,6 +33,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "VirtRegMap.h"
 #include <cmath>
+#include <algorithm>
 
 using namespace llvm;
 
index 00e4e8979e9d509f5d306292453be8fa6cc09fc1..eda105f10cad0ef556b5b127922e340fed775b95 100644 (file)
@@ -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);
index 73a99c22121b4badcc1f9f11f0ac781ca30b4270..4493cad21b411c54762000f359df6de7ba7016fb 100644 (file)
@@ -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 {
index 24a2963c27ea110a36af8cb6b60a0a7e17fdc7d1..ef684e7b89df927a6b5b9a1084abfeac0d836e15 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/Statistic.h"
+#include <algorithm>
 using namespace llvm;
 
 namespace {
index 81f5cd3ed3ae3b9b3632c78048ecf20ace2ee108..18119ac614de375dd22a4ab85131d85380158d06 100644 (file)
@@ -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.
index c93217333041609bc4f63b98506597a6093a27b6..419c8a7542156fc623592c900d06d2cf1a36bba6 100644 (file)
@@ -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();