Unbreak VC++ build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index b5ee6c4..9f2842a 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -18,6 +18,25 @@
 #include <iterator>
 #include <memory>
 
+#ifdef _MSC_VER
+namespace std {
+  // Fix bug in VC++ implementation of std::uninitialized_copy.  Define
+  // additional overloads so that the copy is recognized as a scalar and
+  // not an object copy.
+  template<class T1, class T2>
+  inline _Scalar_ptr_iterator_tag _Ptr_cat(T1 **, T2 **) {
+	  _Scalar_ptr_iterator_tag _Cat;
+	  return _Cat;
+  }
+
+  template<class T1, class T2>
+  inline _Scalar_ptr_iterator_tag _Ptr_cat(T1* const *, T2 **) {
+	  _Scalar_ptr_iterator_tag _Cat;
+	  return _Cat;
+  }
+}
+#endif
+
 namespace llvm {
 
 /// SmallVectorImpl - This class consists of common code factored out of the
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index b950ca4..27d7e04 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -22,6 +22,7 @@
 #define LLVM_ANALYSIS_SCALAREVOLUTION_H
 
 #include "llvm/Pass.h"
+#include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Streams.h"
 #include <set>
 
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index f0bc91f..4183343 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -255,7 +255,7 @@
   uint64_t v = Value - ((Value >> 1) & 0x5555555555555555ULL);
   v = (v & 0x3333333333333333ULL) + ((v >> 2) & 0x3333333333333333ULL);
   v = (v + (v >> 4)) & 0x0F0F0F0F0F0F0F0FULL;
-  return (uint64_t)(v * 0x0101010101010101ULL) >> 56;
+  return unsigned((uint64_t)(v * 0x0101010101010101ULL) >> 56);
 #endif
 }
 
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index 01aedda..1288674 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -72,8 +72,8 @@
         // N = N + Offset
         Offset += TD.getStructLayout(ST)->getElementOffset(CI->getZExtValue());
       } else {
-        const SequentialType *ST = cast<SequentialType>(*GTI);
-        Offset += TD.getTypeSize(ST->getElementType())*CI->getSExtValue();
+        const SequentialType *SQT = cast<SequentialType>(*GTI);
+        Offset += TD.getTypeSize(SQT->getElementType())*CI->getSExtValue();
       }
     }
     return true;
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index 52b1919..0a281c8 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -62,6 +62,7 @@
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/Statistic.h"
+#include <algorithm>
 #include <set>
 using namespace llvm;
 
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index afaf782..27890e9 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -3301,7 +3301,7 @@
     // Flags[2] -> isSRet
     // Flags[1] -> isInReg
     // Flags[0] -> isSigned
-    unsigned Flags = (isSRet << 2) | (isInReg << 1) | isSigned |
+    unsigned Flags = (isSRet << 2) | (isInReg << 1) | unsigned(isSigned) |
       (OriginalAlignment << 27);
 
     switch (getTypeAction(VT)) {
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index 683211b..08ec236 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -17,6 +17,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/MathExtras.h"
+#include <math.h>
 #include <cstring>
 #include <cstdlib>
 #ifndef NDEBUG
@@ -1224,9 +1225,16 @@
   // an IEEE double precision floating point value), then we can use the
   // libc sqrt function which will probably use a hardware sqrt computation.
   // This should be faster than the algorithm below.
-  if (magnitude < 52)
+  if (magnitude < 52) {
+#ifdef _MSC_VER
+    // Amazingly, VC++ doesn't have round().
+    return APInt(BitWidth, 
+                 uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0]))) + 0.5);
+#else
     return APInt(BitWidth, 
                  uint64_t(::round(::sqrt(double(isSingleWord()?VAL:pVal[0])))));
+#endif
+  }
 
   // Okay, all the short cuts are exhausted. We must compute it. The following
   // is a classical Babylonian method for computing the square root. This code
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index dfa6d2a..b1f0807 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -400,7 +400,7 @@
     unsigned char Alignment;
     Size = getTypeSize(ATy->getElementType());
     Alignment = getABITypeAlignment(ATy->getElementType());
-    unsigned AlignedSize = (Size + Alignment - 1)/Alignment*Alignment;
+    uint64_t AlignedSize = (Size + Alignment - 1)/Alignment*Alignment;
     return AlignedSize*ATy->getNumElements();
   }
   case Type::StructTyID: {
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index aeb4173..ce6db56 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -22,6 +22,7 @@
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/ADT/Statistic.h"
+#include <algorithm>
 using namespace llvm;
 
 STATISTIC(NumRaised, "Number of allocations raised");
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 2a08ced..e8dbb73 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -7663,6 +7663,7 @@
                            PhiVal, ConstantOp);
   else
     assert(0 && "Unknown operation");
+  return 0;
 }
 
 /// DeadPHICycle - Return true if this PHI node is only used by a PHI node cycle
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index b425a8c..324cbc6 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -421,7 +421,7 @@
           iSGT = iUGT;
           iSLT = iULT;
         } else {
-          assert(iULT->first->getValue().isPositive() >= 0 &&
+          assert(iULT->first->getValue().isPositive() &&
                  iUGT->first->getValue().isNegative() &&"Bad sign comparison.");
           iSGT = iULT;
           iSLT = iUGT;
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp
index 2e27015..b593d47 100644
--- a/lib/VMCore/Pass.cpp
+++ b/lib/VMCore/Pass.cpp
@@ -19,6 +19,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/TypeInfo.h"
+#include <algorithm>
 #include <set>
 using namespace llvm;
 
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index a2bbb7d..470428f 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -19,6 +19,7 @@
 #include "llvm/ModuleProvider.h"
 #include "llvm/Support/Streams.h"
 #include "llvm/Support/ManagedStatic.h"
+#include <algorithm>
 #include <vector>
 #include <map>
 
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 4c76b2b..8bc99a8 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -128,7 +128,7 @@
 
 void Value::setName(const char *NameStr, unsigned NameLen) {
   if (NameLen == 0 && !hasName()) return;
-  if (getType() != Type::VoidTy && "Cannot assign a name to void values!");
+  assert(getType() != Type::VoidTy && "Cannot assign a name to void values!");
   
   // Get the symbol table to update for this object.
   ValueSymbolTable *ST;
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index 49f662d..bad001e 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -22,6 +22,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/System/Signals.h"
+#include <algorithm>
 #include <cctype>
 #include <cerrno>
 #include <cstring>
diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp
index b0767e6..6b1d514 100644
--- a/tools/llvm-prof/llvm-prof.cpp
+++ b/tools/llvm-prof/llvm-prof.cpp
@@ -21,6 +21,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/System/Signals.h"
+#include <algorithm>
 #include <iostream>
 #include <iomanip>
 #include <map>
diff --git a/win32/Analysis/Analysis.vcproj b/win32/Analysis/Analysis.vcproj
index d224139..56befea 100644
--- a/win32/Analysis/Analysis.vcproj
+++ b/win32/Analysis/Analysis.vcproj
@@ -133,9 +133,6 @@
 				RelativePath="..\..\lib\Analysis\ConstantFolding.cpp">
 			</File>
 			<File
-				RelativePath="..\..\lib\Analysis\ConstantRange.cpp">
-			</File>
-			<File
 				RelativePath="..\..\lib\Analysis\InstCount.cpp">
 			</File>
 			<File
@@ -151,6 +148,9 @@
 				RelativePath="..\..\lib\Analysis\LoopInfo.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\Analysis\LoopPass.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\Analysis\PostDominators.cpp">
 			</File>
 			<File
@@ -241,6 +241,9 @@
 				RelativePath="..\..\include\llvm\Analysis\LoopInfo.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\Analysis\LoopPass.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\Analysis\Passes.h">
 			</File>
 			<File
diff --git a/win32/Bytecode/Bytecode.vcproj b/win32/Bytecode/Bytecode.vcproj
index b962f1a..d0980b9 100644
--- a/win32/Bytecode/Bytecode.vcproj
+++ b/win32/Bytecode/Bytecode.vcproj
@@ -134,9 +134,6 @@
 					RelativePath="..\..\lib\Bytecode\Writer\SlotCalculator.h">
 				</File>
 				<File
-					RelativePath="..\..\lib\Bytecode\Writer\SlotTable.h">
-				</File>
-				<File
 					RelativePath="..\..\lib\Bytecode\Writer\Writer.cpp">
 				</File>
 				<File
diff --git a/win32/CodeGen/CodeGen.vcproj b/win32/CodeGen/CodeGen.vcproj
index 43ef031..3486f79 100644
--- a/win32/CodeGen/CodeGen.vcproj
+++ b/win32/CodeGen/CodeGen.vcproj
@@ -121,6 +121,9 @@
 				RelativePath="..\..\lib\CodeGen\ELFWriter.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\CodeGen\ELFWriter.h">
+			</File>
+			<File
 				RelativePath="..\..\lib\CodeGen\IntrinsicLowering.cpp">
 			</File>
 			<File
@@ -139,18 +142,24 @@
 				RelativePath="..\..\lib\CodeGen\MachineBasicBlock.cpp">
 			</File>
 			<File
-				RelativePath="..\..\lib\CodeGen\MachineDebugInfo.cpp">
-			</File>
-			<File
 				RelativePath="..\..\lib\CodeGen\MachineFunction.cpp">
 			</File>
 			<File
 				RelativePath="..\..\lib\CodeGen\MachineInstr.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\CodeGen\MachineModuleInfo.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\CodeGen\MachinePassRegistry.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\CodeGen\MachOWriter.cpp">
+			</File>
+			<File
+				RelativePath="..\..\lib\CodeGen\MachOWriter.h">
+			</File>
+			<File
 				RelativePath="..\..\lib\CodeGen\Passes.cpp">
 			</File>
 			<File
@@ -169,6 +178,9 @@
 				RelativePath="..\..\lib\CodeGen\RegAllocSimple.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\CodeGen\RegisterScavenging.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\CodeGen\TwoAddressInstructionPass.cpp">
 			</File>
 			<File
@@ -181,6 +193,9 @@
 				Name="SelectionDAG"
 				Filter="">
 				<File
+					RelativePath="..\..\lib\CodeGen\SelectionDAG\CallingConvLower.cpp">
+				</File>
+				<File
 					RelativePath="..\..\lib\CodeGen\SelectionDAG\DAGCombiner.cpp">
 				</File>
 				<File
@@ -220,10 +235,13 @@
 				RelativePath="..\..\include\llvm\CodeGen\AsmPrinter.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\CodeGen\CallingConvLower.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\CodeGen\DwarfWriter.h">
 			</File>
 			<File
-				RelativePath="..\..\include\llvm\CodeGen\ELFWriter.h">
+				RelativePath="..\..\include\llvm\CodeGen\FileWriters.h">
 			</File>
 			<File
 				RelativePath="..\..\include\llvm\CodeGen\InstrScheduling.h">
@@ -274,13 +292,16 @@
 				RelativePath="..\..\include\llvm\CodeGen\MachineLocation.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\CodeGen\MachineModuleInfo.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\CodeGen\MachinePassRegistry.h">
 			</File>
 			<File
 				RelativePath="..\..\include\llvm\CodeGen\MachineRelocation.h">
 			</File>
 			<File
-				RelativePath="..\..\include\llvm\CodeGen\MachOWriter.h">
+				RelativePath="..\..\include\llvm\CodeGen\MachORelocation.h">
 			</File>
 			<File
 				RelativePath="..\..\include\llvm\CodeGen\Passes.h">
@@ -292,6 +313,9 @@
 				RelativePath="..\..\include\llvm\CodeGen\RegAllocRegistry.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\CodeGen\RegisterScavenging.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\CodeGen\RuntimeLibcalls.h">
 			</File>
 			<File
diff --git a/win32/Support/Support.vcproj b/win32/Support/Support.vcproj
index 613bb0f..56e98d2 100644
--- a/win32/Support/Support.vcproj
+++ b/win32/Support/Support.vcproj
@@ -116,6 +116,9 @@
 				RelativePath="..\..\lib\Support\Annotation.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\Support\APInt.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\Support\CommandLine.cpp">
 			</File>
 			<File
@@ -128,7 +131,7 @@
 				</FileConfiguration>
 			</File>
 			<File
-				RelativePath="..\..\lib\Support\CStringMap.cpp">
+				RelativePath="..\..\lib\Support\ConstantRange.cpp">
 			</File>
 			<File
 				RelativePath="..\..\lib\Support\Debug.cpp">
@@ -173,6 +176,9 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\lib\Support\SmallPtrSet.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\Support\Statistic.cpp">
 			</File>
 			<File
@@ -182,6 +188,9 @@
 				RelativePath="..\..\lib\Support\StringExtras.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\Support\StringMap.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\Support\SystemUtils.cpp">
 			</File>
 			<File
@@ -302,6 +311,9 @@
 				RelativePath="..\..\include\llvm\Support\MathExtras.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\Support\OutputBuffer.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\Support\PassNameParser.h">
 			</File>
 			<File
@@ -342,10 +354,10 @@
 			Name="ADT"
 			Filter="">
 			<File
-				RelativePath="..\..\include\llvm\Adt\BitSetVector.h">
+				RelativePath="..\..\include\llvm\ADT\APInt.h">
 			</File>
 			<File
-				RelativePath="..\..\include\llvm\ADT\CStringMap.h">
+				RelativePath="..\..\include\llvm\ADT\BitVector.h">
 			</File>
 			<File
 				RelativePath="..\..\include\llvm\Adt\DenseMap.h">
@@ -375,6 +387,9 @@
 				RelativePath="..\..\include\llvm\Adt\ilist">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\ADT\IndexedMap.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\Adt\iterator">
 			</File>
 			<File
@@ -390,6 +405,12 @@
 				RelativePath="..\..\include\llvm\Adt\SetVector.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\ADT\SmallPtrSet.h">
+			</File>
+			<File
+				RelativePath="..\..\include\llvm\ADT\SmallSet.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\ADT\SmallString.h">
 			</File>
 			<File
@@ -405,6 +426,9 @@
 				RelativePath="..\..\include\llvm\Adt\StringExtras.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\ADT\StringMap.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\Adt\Tree.h">
 			</File>
 			<File
diff --git a/win32/System/System.vcproj b/win32/System/System.vcproj
index 1286da3..e5cb3e8 100644
--- a/win32/System/System.vcproj
+++ b/win32/System/System.vcproj
@@ -113,6 +113,9 @@
 				RelativePath="..\..\lib\System\Alarm.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\System\Disassembler.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\System\DynamicLibrary.cpp">
 			</File>
 			<File
@@ -151,6 +154,9 @@
 				RelativePath="..\..\include\llvm\System\Alarm.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\System\Disassembler.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\System\DynamicLibrary.h">
 			</File>
 			<File
diff --git a/win32/TableGen/TableGen.vcproj b/win32/TableGen/TableGen.vcproj
index e0a02b7..407da44 100644
--- a/win32/TableGen/TableGen.vcproj
+++ b/win32/TableGen/TableGen.vcproj
@@ -129,6 +129,9 @@
 				RelativePath="..\..\utils\TableGen\AsmWriterEmitter.cpp">
 			</File>
 			<File
+				RelativePath="..\..\utils\TableGen\CallingConvEmitter.cpp">
+			</File>
+			<File
 				RelativePath="..\..\utils\TableGen\CodeEmitterGen.cpp">
 			</File>
 			<File
@@ -209,6 +212,9 @@
 				RelativePath="..\..\utils\TableGen\AsmWriterEmitter.h">
 			</File>
 			<File
+				RelativePath="..\..\utils\TableGen\CallingConvEmitter.h">
+			</File>
+			<File
 				RelativePath="..\..\utils\TableGen\CodeEmitterGen.h">
 			</File>
 			<File
diff --git a/win32/Target/Target.vcproj b/win32/Target/Target.vcproj
index 36d5ec9..da5f87f 100644
--- a/win32/Target/Target.vcproj
+++ b/win32/Target/Target.vcproj
@@ -133,6 +133,9 @@
 				RelativePath="..\..\lib\Target\TargetMachineRegistry.cpp">
 			</File>
 			<File
+				RelativePath="..\..\lib\Target\TargetMachOWriterInfo.cpp">
+			</File>
+			<File
 				RelativePath="..\..\lib\Target\TargetSubtarget.cpp">
 			</File>
 		</Filter>
@@ -153,6 +156,9 @@
 				RelativePath="..\..\include\llvm\Target\TargetData.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\Target\TargetELFWriterInfo.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\Target\TargetFrameInfo.h">
 			</File>
 			<File
@@ -174,6 +180,9 @@
 				RelativePath="..\..\include\llvm\Target\TargetMachineRegistry.h">
 			</File>
 			<File
+				RelativePath="..\..\include\llvm\Target\TargetMachOWriterInfo.h">
+			</File>
+			<File
 				RelativePath="..\..\include\llvm\Target\TargetOptions.h">
 			</File>
 			<File
diff --git a/win32/Transforms/Transforms.vcproj b/win32/Transforms/Transforms.vcproj
index e1856da..f756c62 100644
--- a/win32/Transforms/Transforms.vcproj
+++ b/win32/Transforms/Transforms.vcproj
@@ -108,18 +108,6 @@
 			Name="Source Files"
 			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\..\lib\Transforms\ExprTypeConvert.cpp">
-			</File>
-			<File
-				RelativePath="..\..\lib\Transforms\LevelRaise.cpp">
-			</File>
-			<File
-				RelativePath="..\..\lib\Transforms\TransformInternals.cpp">
-			</File>
-			<File
-				RelativePath="..\..\lib\Transforms\TransformInternals.h">
-			</File>
 			<Filter
 				Name="Instrumentation"
 				Filter="">
@@ -130,9 +118,6 @@
 					RelativePath="..\..\lib\Transforms\Instrumentation\EdgeProfiling.cpp">
 				</File>
 				<File
-					RelativePath="..\..\lib\Transforms\Instrumentation\EmitFunctions.cpp">
-				</File>
-				<File
 					RelativePath="..\..\lib\Transforms\Instrumentation\ProfilingUtils.cpp">
 				</File>
 				<File
@@ -144,9 +129,6 @@
 				<File
 					RelativePath="..\..\lib\Transforms\Instrumentation\RSProfiling.h">
 				</File>
-				<File
-					RelativePath="..\..\lib\Transforms\Instrumentation\TraceBasicBlocks.cpp">
-				</File>
 			</Filter>
 			<Filter
 				Name="IPO"
@@ -167,9 +149,6 @@
 					RelativePath="..\..\lib\Transforms\Ipo\ExtractFunction.cpp">
 				</File>
 				<File
-					RelativePath="..\..\lib\Transforms\Ipo\FunctionResolution.cpp">
-				</File>
-				<File
 					RelativePath="..\..\lib\Transforms\Ipo\GlobalDCE.cpp">
 				</File>
 				<File
@@ -209,6 +188,9 @@
 					RelativePath="..\..\lib\Transforms\Ipo\SimplifyLibCalls.cpp">
 				</File>
 				<File
+					RelativePath="..\..\lib\Transforms\IPO\StripDeadPrototypes.cpp">
+				</File>
+				<File
 					RelativePath="..\..\lib\Transforms\Ipo\StripSymbols.cpp">
 				</File>
 			</Filter>
diff --git a/win32/VMCore/VMCore.vcproj b/win32/VMCore/VMCore.vcproj
index c9b4b5e..9ccf289 100644
--- a/win32/VMCore/VMCore.vcproj
+++ b/win32/VMCore/VMCore.vcproj
@@ -116,7 +116,7 @@
 				RelativePath="..\..\lib\VMCore\BasicBlock.cpp">
 			</File>
 			<File
-				RelativePath="..\..\lib\VMCore\ConstantFolding.cpp">
+				RelativePath="..\..\lib\VMCore\ConstantFold.cpp">
 			</File>
 			<File
 				RelativePath="..\..\lib\VMCore\Constants.cpp">
@@ -149,7 +149,8 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Performing TableGen Step"
-						CommandLine="..\$(IntDir)\TableGen.exe -gen-intrinsic -I ..\..\include $(InputPath) -o $(SolutionDir)llvm\intrinsics.gen
+						CommandLine="echo Building $(InputFileName) code emitter with tblgen
+..\$(IntDir)\TableGen.exe -gen-intrinsic -I ..\..\include $(InputPath) -o $(SolutionDir)llvm\intrinsics.gen
 "
 						AdditionalDependencies="$(ProjectDir)..\$(IntDir)\TableGen.exe;$(InputDir)IntrinsicsX86.td;$(InputDir)IntrinsicsPowerPC.td"
 						Outputs="$(SolutionDir)llvm\intrinsics.gen"/>
@@ -159,7 +160,8 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Performing TableGen Step"
-						CommandLine="..\$(IntDir)\TableGen.exe -gen-intrinsic -I ..\..\include $(InputPath) -o $(SolutionDir)llvm\intrinsics.gen
+						CommandLine="echo Building $(InputFileName) code emitter with tblgen
+..\$(IntDir)\TableGen.exe -gen-intrinsic -I ..\..\include $(InputPath) -o $(SolutionDir)llvm\intrinsics.gen
 "
 						AdditionalDependencies="$(ProjectDir)..\$(IntDir)\TableGen.exe;$(InputDir)IntrinsicsX86.td;$(InputDir)IntrinsicsPowerPC.td"
 						Outputs="$(SolutionDir)llvm\intrinsics.gen"/>
@@ -184,9 +186,6 @@
 				RelativePath="..\..\lib\VMCore\PassManager.cpp">
 			</File>
 			<File
-				RelativePath="..\..\lib\VMCore\SymbolTable.cpp">
-			</File>
-			<File
 				RelativePath="..\..\lib\VMCore\Type.cpp">
 			</File>
 			<File
@@ -228,7 +227,7 @@
 				RelativePath="..\..\include\llvm\Constant.h">
 			</File>
 			<File
-				RelativePath="..\..\lib\VMCore\ConstantFolding.h">
+				RelativePath="..\..\lib\VMCore\ConstantFold.h">
 			</File>
 			<File
 				RelativePath="..\..\include\llvm\Constants.h">
@@ -300,9 +299,6 @@
 				RelativePath="..\..\include\llvm\Assembly\PrintModulePass.h">
 			</File>
 			<File
-				RelativePath="..\..\include\llvm\SymbolTable.h">
-			</File>
-			<File
 				RelativePath="..\..\include\llvm\SymbolTableListTraits.h">
 			</File>
 			<File
diff --git a/win32/x86/x86.vcproj b/win32/x86/x86.vcproj
index 088d785..b002488 100644
--- a/win32/x86/x86.vcproj
+++ b/win32/x86/x86.vcproj
@@ -116,36 +116,58 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Performing TableGen Step"
-						CommandLine="..\$(IntDir)\TableGen.exe -gen-register-enums -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterNames.inc
+						CommandLine="echo Building $(InputFileName) register names with tblgen
+..\$(IntDir)\TableGen.exe -gen-register-enums -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterNames.inc
+echo Building $(InputFileName) register information header with tblgen
 ..\$(IntDir)\TableGen.exe -gen-register-desc-header -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterInfo.h.inc
+echo Building $(InputFileName) register information implementation with tblgen
 ..\$(IntDir)\TableGen.exe -gen-register-desc -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterInfo.inc
+echo Building $(InputFileName) instruction names with tblgen
 ..\$(IntDir)\TableGen.exe -gen-instr-enums -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenInstrNames.inc
+echo Building $(InputFileName) instruction information with tblgen
 ..\$(IntDir)\TableGen.exe -gen-instr-desc -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenInstrInfo.inc
+echo Building $(InputFileName) assembly writer with tblgen
 ..\$(IntDir)\TableGen.exe -gen-asm-writer -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenAsmWriter.inc
+echo Building $(InputFileName) assembly writer #1 with tblgen
 ..\$(IntDir)\TableGen.exe -gen-asm-writer -asmwriternum=1 -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenAsmWriter1.inc
+echo Building $(InputFileName) instruction selector implementation with tblgen
 ..\$(IntDir)\TableGen.exe -gen-dag-isel -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenDAGISel.inc
+echo Building $(InputFileName) subtarget information with tblgen
 ..\$(IntDir)\TableGen.exe -gen-subtarget -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenSubtarget.inc
+echo Building $(InputFileName) calling convention information with tblgen
+..\$(IntDir)\TableGen.exe -gen-callingconv -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenCallingConv.inc
 "
-						AdditionalDependencies="$(InputDir)X86InstrInfo.td;$(InputDir)X86RegisterInfo.td;$(InputDir)X86InstrFPStack.td;$(InputDir)X86InstrMMX.td;$(InputDir)X86InstrSSE.td;$(InputDir)..\Target.td;$(InputDir)..\TargetSchedule.td;$(InputDir)..\TargetScheduleDAG.td;$(ProjectDir)..\$(IntDir)\TableGen.exe"
-						Outputs="X86GenRegisterNames.inc;X86GenRegisterInfo.h.inc;X86GenRegisterInfo.inc;X86GenInstrNames.inc;X86GenInstrInfo.inc;X86GenAsmWriter.inc;X86GenAsmWriter1.inc;X86GenDAGISel.inc;X86GenSubtarget.inc"/>
+						AdditionalDependencies="$(InputDir)X86InstrInfo.td;$(InputDir)X86RegisterInfo.td;$(InputDir)X86InstrFPStack.td;$(InputDir)X86InstrMMX.td;$(InputDir)X86InstrSSE.td;$(InputDir)X86CallingConv.td;$(InputDir)..\Target.td;$(InputDir)..\TargetSchedule.td;$(InputDir)..\TargetScheduleDAG.td;$(ProjectDir)..\$(IntDir)\TableGen.exe"
+						Outputs="X86GenRegisterNames.inc;X86GenRegisterInfo.h.inc;X86GenRegisterInfo.inc;X86GenInstrNames.inc;X86GenInstrInfo.inc;X86GenAsmWriter.inc;X86GenAsmWriter1.inc;X86GenDAGISel.inc;X86GenSubtarget.inc;X86GenCallingConv.inc"/>
 				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32">
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Performing TableGen Step"
-						CommandLine="..\$(IntDir)\TableGen.exe -gen-register-enums -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterNames.inc
+						CommandLine="echo Building $(InputFileName) register names with tblgen
+..\$(IntDir)\TableGen.exe -gen-register-enums -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterNames.inc
+echo Building $(InputFileName) register information header with tblgen
 ..\$(IntDir)\TableGen.exe -gen-register-desc-header -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterInfo.h.inc
+echo Building $(InputFileName) register information implementation with tblgen
 ..\$(IntDir)\TableGen.exe -gen-register-desc -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenRegisterInfo.inc
+echo Building $(InputFileName) instruction names with tblgen
 ..\$(IntDir)\TableGen.exe -gen-instr-enums -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenInstrNames.inc
+echo Building $(InputFileName) instruction information with tblgen
 ..\$(IntDir)\TableGen.exe -gen-instr-desc -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenInstrInfo.inc
+echo Building $(InputFileName) assembly writer with tblgen
 ..\$(IntDir)\TableGen.exe -gen-asm-writer -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenAsmWriter.inc
+echo Building $(InputFileName) assembly writer #1 with tblgen
 ..\$(IntDir)\TableGen.exe -gen-asm-writer -asmwriternum=1 -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenAsmWriter1.inc
+echo Building $(InputFileName) instruction selector implementation with tblgen
 ..\$(IntDir)\TableGen.exe -gen-dag-isel -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenDAGISel.inc
+echo Building $(InputFileName) subtarget information with tblgen
 ..\$(IntDir)\TableGen.exe -gen-subtarget -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenSubtarget.inc
+echo Building $(InputFileName) calling convention information with tblgen
+..\$(IntDir)\TableGen.exe -gen-callingconv -I ..\..\lib\Target -I ..\..\lib\Target\X86 -I ..\..\include $(InputPath) -o X86GenCallingConv.inc
 "
-						AdditionalDependencies="$(InputDir)X86InstrInfo.td;$(InputDir)X86RegisterInfo.td;$(InputDir)X86InstrFPStack.td;$(InputDir)X86InstrMMX.td;$(InputDir)X86InstrSSE.td;$(InputDir)..\Target.td;$(InputDir)..\TargetSchedule.td;$(InputDir)..\TargetScheduleDAG.td;$(ProjectDir)..\$(IntDir)\TableGen.exe"
-						Outputs="X86GenRegisterNames.inc;X86GenRegisterInfo.h.inc;X86GenRegisterInfo.inc;X86GenInstrNames.inc;X86GenInstrInfo.inc;X86GenAsmWriter.inc;X86GenAsmWriter1.inc;X86GenDAGISel.inc;X86GenSubtarget.inc"/>
+						AdditionalDependencies="$(InputDir)X86InstrInfo.td;$(InputDir)X86RegisterInfo.td;$(InputDir)X86InstrFPStack.td;$(InputDir)X86InstrMMX.td;$(InputDir)X86InstrSSE.td;$(InputDir)X86CallingConv.td;$(InputDir)..\Target.td;$(InputDir)..\TargetSchedule.td;$(InputDir)..\TargetScheduleDAG.td;$(ProjectDir)..\$(IntDir)\TableGen.exe"
+						Outputs="X86GenRegisterNames.inc;X86GenRegisterInfo.h.inc;X86GenRegisterInfo.inc;X86GenInstrNames.inc;X86GenInstrInfo.inc;X86GenAsmWriter.inc;X86GenAsmWriter1.inc;X86GenDAGISel.inc;X86GenSubtarget.inc;X86GenCallingConv.inc"/>
 				</FileConfiguration>
 			</File>
 			<File
@@ -158,7 +180,13 @@
 				RelativePath="..\..\lib\Target\X86\X86CodeEmitter.cpp">
 			</File>
 			<File
-				RelativePath="..\..\lib\Target\X86\X86ELFWriter.cpp">
+				RelativePath="..\..\lib\Target\X86\X86COFF.h">
+			</File>
+			<File
+				RelativePath="..\..\lib\Target\X86\X86ELFWriterInfo.cpp">
+			</File>
+			<File
+				RelativePath="..\..\lib\Target\X86\X86ELFWriterInfo.h">
 			</File>
 			<File
 				RelativePath="..\..\lib\Target\X86\X86FloatingPoint.cpp">
@@ -214,6 +242,9 @@
 				RelativePath="..\..\lib\Target\X86\X86ATTAsmPrinter.h">
 			</File>
 			<File
+				RelativePath="..\..\lib\Target\X86\X86CallingConv.td">
+			</File>
+			<File
 				RelativePath="..\..\lib\Target\X86\X86InstrBuilder.h">
 			</File>
 			<File