Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index 9d92853..a580420 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -30,7 +30,7 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/System/FEnv.h"
+#include "llvm/Support/FEnv.h"
 #include <cerrno>
 #include <cmath>
 using namespace llvm;
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 54c715c..e2e5593 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -16,7 +16,7 @@
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Module.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/System/Process.h"
+#include "llvm/Support/Process.h"
 #include <memory>
 #include <cstring>
 using namespace llvm;
diff --git a/lib/Archive/ArchiveInternals.h b/lib/Archive/ArchiveInternals.h
index 08f20e7..55684f7 100644
--- a/lib/Archive/ArchiveInternals.h
+++ b/lib/Archive/ArchiveInternals.h
@@ -15,7 +15,7 @@
 #define LIB_ARCHIVE_ARCHIVEINTERNALS_H
 
 #include "llvm/Bitcode/Archive.h"
-#include "llvm/System/TimeValue.h"
+#include "llvm/Support/TimeValue.h"
 #include "llvm/ADT/StringExtras.h"
 
 #include <cstring>
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 7eeeb59..de5887e 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -16,8 +16,8 @@
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/System/Process.h"
-#include "llvm/System/Signals.h"
+#include "llvm/Support/Process.h"
+#include "llvm/Support/Signals.h"
 #include <fstream>
 #include <ostream>
 #include <iomanip>
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 4e6e6d9..a1f5b38 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -26,7 +26,7 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Program.h"
+#include "llvm/Support/Program.h"
 using namespace llvm;
 
 /// These are manifest constants used by the bitcode writer. They do not need to
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index d242326..f2c7238 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -39,7 +39,7 @@
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Support/Timer.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 using namespace llvm;
 
 static cl::opt<bool> PrintDbgScope("print-dbgscope", cl::Hidden,
diff --git a/lib/CodeGen/ELF.h b/lib/CodeGen/ELF.h
index fb884c9..e08feeb 100644
--- a/lib/CodeGen/ELF.h
+++ b/lib/CodeGen/ELF.h
@@ -23,7 +23,7 @@
 #include "llvm/CodeGen/BinaryObject.h"
 #include "llvm/CodeGen/MachineRelocation.h"
 #include "llvm/Support/ELF.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
   class GlobalValue;
diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp
index 5e86e5a..73b66d8 100644
--- a/lib/CodeGen/PseudoSourceValue.cpp
+++ b/lib/CodeGen/PseudoSourceValue.cpp
@@ -18,7 +18,7 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include <map>
 using namespace llvm;
 
diff --git a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
index ac2d338..2dcb229 100644
--- a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
+++ b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h
@@ -16,7 +16,7 @@
 
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/DebugLoc.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
 
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 143f10d..1ceb45f 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -44,7 +44,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallSet.h"
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 1f5711c..7f21e65 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -26,8 +26,8 @@
 #include "llvm/Support/MutexGuard.h"
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/DynamicLibrary.h"
-#include "llvm/System/Host.h"
+#include "llvm/Support/DynamicLibrary.h"
+#include "llvm/Support/Host.h"
 #include "llvm/Target/TargetData.h"
 #include <cmath>
 #include <cstring>
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 57d1260..062256a 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -24,10 +24,10 @@
 #include "llvm/Module.h"
 #include "llvm/Config/config.h"     // Detect libffi
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/System/DynamicLibrary.h"
+#include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/ManagedStatic.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include <csignal>
 #include <cstdio>
 #include <map>
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h
index 564e9ab..bfebe3d 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.h
+++ b/lib/ExecutionEngine/Interpreter/Interpreter.h
@@ -19,7 +19,7 @@
 #include "llvm/ExecutionEngine/GenericValue.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/CallSite.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Support/raw_ostream.h"
diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp
index 274f816..169e1ba 100644
--- a/lib/ExecutionEngine/JIT/Intercept.cpp
+++ b/lib/ExecutionEngine/JIT/Intercept.cpp
@@ -17,7 +17,7 @@
 
 #include "JIT.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/System/DynamicLibrary.h"
+#include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Config/config.h"
 using namespace llvm;
 
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 2bf216a..cc76b13 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -30,7 +30,7 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MutexGuard.h"
-#include "llvm/System/DynamicLibrary.h"
+#include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Config/config.h"
 
 using namespace llvm;
diff --git a/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp b/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp
index d01d34b..3b5acb7 100644
--- a/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp
+++ b/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp
@@ -25,7 +25,7 @@
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/MutexGuard.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include <string>
 #include <vector>
 
diff --git a/lib/ExecutionEngine/JIT/JITDebugRegisterer.h b/lib/ExecutionEngine/JIT/JITDebugRegisterer.h
index 7e53d78..dce506b 100644
--- a/lib/ExecutionEngine/JIT/JITDebugRegisterer.h
+++ b/lib/ExecutionEngine/JIT/JITDebugRegisterer.h
@@ -16,7 +16,7 @@
 #define LLVM_EXECUTION_ENGINE_JIT_DEBUGREGISTERER_H
 
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 #include <string>
 
 // This must be kept in sync with gdb/gdb/jit.h .
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 4c0d078..4cd8757 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -42,8 +42,8 @@
 #include "llvm/Support/MutexGuard.h"
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Disassembler.h"
-#include "llvm/System/Memory.h"
+#include "llvm/Support/Disassembler.h"
+#include "llvm/Support/Memory.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
diff --git a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
index 653e6f1..eec23ce 100644
--- a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
+++ b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
@@ -22,7 +22,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Memory.h"
+#include "llvm/Support/Memory.h"
 #include <vector>
 #include <cassert>
 #include <climits>
diff --git a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
index 1ca084b..670fa7d 100644
--- a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
+++ b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
@@ -26,7 +26,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ValueHandle.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Errno.h"
+#include "llvm/Support/Errno.h"
 #include "llvm/Config/config.h"
 #include <stddef.h>
 using namespace llvm;
diff --git a/lib/ExecutionEngine/JIT/TargetSelect.cpp b/lib/ExecutionEngine/JIT/TargetSelect.cpp
index 3349c33..6b7173c 100644
--- a/lib/ExecutionEngine/JIT/TargetSelect.cpp
+++ b/lib/ExecutionEngine/JIT/TargetSelect.cpp
@@ -18,7 +18,7 @@
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Host.h"
+#include "llvm/Support/Host.h"
 #include "llvm/Target/SubtargetFeature.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetRegistry.h"
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 532a438..f1e9dab 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -11,7 +11,7 @@
 #include "llvm/ExecutionEngine/GenericValue.h"
 #include "llvm/ExecutionEngine/MCJIT.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/System/DynamicLibrary.h"
+#include "llvm/Support/DynamicLibrary.h"
 
 using namespace llvm;
 
diff --git a/lib/ExecutionEngine/MCJIT/TargetSelect.cpp b/lib/ExecutionEngine/MCJIT/TargetSelect.cpp
index 0ade396..50f6593 100644
--- a/lib/ExecutionEngine/MCJIT/TargetSelect.cpp
+++ b/lib/ExecutionEngine/MCJIT/TargetSelect.cpp
@@ -18,7 +18,7 @@
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Host.h"
+#include "llvm/Support/Host.h"
 #include "llvm/Target/SubtargetFeature.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetRegistry.h"
diff --git a/lib/Linker/LinkItems.cpp b/lib/Linker/LinkItems.cpp
index 1be2bec..cbbdd4b 100644
--- a/lib/Linker/LinkItems.cpp
+++ b/lib/Linker/LinkItems.cpp
@@ -15,7 +15,7 @@
 #include "llvm/Linker.h"
 #include "llvm/Module.h"
 #include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MemoryBuffer.h"
 using namespace llvm;
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 2903a7e..dd0b07e 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -28,7 +28,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Transforms/Utils/ValueMapper.h"
 #include "llvm/ADT/DenseMap.h"
 using namespace llvm;
diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp
index 19ecaa3..6e27fda 100644
--- a/lib/Linker/Linker.cpp
+++ b/lib/Linker/Linker.cpp
@@ -14,7 +14,7 @@
 #include "llvm/Linker.h"
 #include "llvm/Module.h"
 #include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Config/config.h"
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp
index edde4b1..37444c9 100644
--- a/lib/MC/MCAsmInfo.cpp
+++ b/lib/MC/MCAsmInfo.cpp
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/MC/MCAsmInfo.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 #include <cctype>
 #include <cstring>
 using namespace llvm;
diff --git a/lib/MC/MCDisassembler/EDDisassembler.h b/lib/MC/MCDisassembler/EDDisassembler.h
index e2f850b..fdbe7ad 100644
--- a/lib/MC/MCDisassembler/EDDisassembler.h
+++ b/lib/MC/MCDisassembler/EDDisassembler.h
@@ -21,7 +21,7 @@
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 
 #include <map>
 #include <set>
diff --git a/lib/MC/MCDisassembler/EDInst.h b/lib/MC/MCDisassembler/EDInst.h
index 39d264f..ceb9505 100644
--- a/lib/MC/MCDisassembler/EDInst.h
+++ b/lib/MC/MCDisassembler/EDInst.h
@@ -16,7 +16,7 @@
 #ifndef LLVM_EDINST_H
 #define LLVM_EDINST_H
 
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 #include "llvm/ADT/SmallVector.h"
 #include <string>
 #include <vector>
diff --git a/lib/MC/MCDisassembler/EDOperand.h b/lib/MC/MCDisassembler/EDOperand.h
index 6e69522..50260ec 100644
--- a/lib/MC/MCDisassembler/EDOperand.h
+++ b/lib/MC/MCDisassembler/EDOperand.h
@@ -16,7 +16,7 @@
 #ifndef LLVM_EDOPERAND_H
 #define LLVM_EDOPERAND_H
 
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 
 namespace llvm {
 
diff --git a/lib/MC/MCDisassembler/EDToken.h b/lib/MC/MCDisassembler/EDToken.h
index 6b2aeac..ba46707 100644
--- a/lib/MC/MCDisassembler/EDToken.h
+++ b/lib/MC/MCDisassembler/EDToken.h
@@ -17,7 +17,7 @@
 #define LLVM_EDTOKEN_H
 
 #include "llvm/ADT/StringRef.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 #include <string>
 #include <vector>
 
diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp
index b330bdd..4aabbc4 100644
--- a/lib/MC/WinCOFFObjectWriter.cpp
+++ b/lib/MC/WinCOFFObjectWriter.cpp
@@ -31,7 +31,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 
-#include "llvm/System/TimeValue.h"
+#include "llvm/Support/TimeValue.h"
 
 #include "../Target/X86/X86FixupKinds.h"
 
diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp
index 1051ce2..7592a99 100644
--- a/lib/Object/MachOObject.cpp
+++ b/lib/Object/MachOObject.cpp
@@ -10,8 +10,8 @@
 #include "llvm/Object/MachOObject.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/System/Host.h"
-#include "llvm/System/SwapByteOrder.h"
+#include "llvm/Support/Host.h"
+#include "llvm/Support/SwapByteOrder.h"
 
 using namespace llvm;
 using namespace llvm::object;
diff --git a/lib/Object/ObjectFile.cpp b/lib/Object/ObjectFile.cpp
index 0ef730b..3ea39b3 100644
--- a/lib/Object/ObjectFile.cpp
+++ b/lib/Object/ObjectFile.cpp
@@ -14,7 +14,7 @@
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 
 using namespace llvm;
 using namespace object;
diff --git a/lib/System/Alarm.cpp b/lib/Support/Alarm.cpp
similarity index 89%
rename from lib/System/Alarm.cpp
rename to lib/Support/Alarm.cpp
index 0014ca7..58ad609 100644
--- a/lib/System/Alarm.cpp
+++ b/lib/Support/Alarm.cpp
@@ -7,11 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements the Alarm functionality 
+// This file implements the Alarm functionality
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Alarm.h"
+#include "llvm/Support/Alarm.h"
 #include "llvm/Config/config.h"
 
 namespace llvm {
@@ -29,5 +29,5 @@
 #include "Unix/Alarm.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/Alarm.inc"
+#include "Windows/Alarm.inc"
 #endif
diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp
index 02b45d8..5e27df6 100644
--- a/lib/Support/Allocator.cpp
+++ b/lib/Support/Allocator.cpp
@@ -12,10 +12,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/Allocator.h"
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Recycler.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Memory.h"
+#include "llvm/Support/Memory.h"
 #include <cstring>
 
 namespace llvm {
diff --git a/lib/System/Atomic.cpp b/lib/Support/Atomic.cpp
similarity index 98%
rename from lib/System/Atomic.cpp
rename to lib/Support/Atomic.cpp
index 7ba8b77..c7b4bff 100644
--- a/lib/System/Atomic.cpp
+++ b/lib/Support/Atomic.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Atomic.h"
+#include "llvm/Support/Atomic.h"
 #include "llvm/Config/config.h"
 
 using namespace llvm;
diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt
index 8a6ed6f..105a507 100644
--- a/lib/Support/CMakeLists.txt
+++ b/lib/Support/CMakeLists.txt
@@ -1,5 +1,8 @@
 ## FIXME: This only requires RTTI because tblgen uses it.  Fix that.
 set(LLVM_REQUIRES_RTTI 1)
+if( MINGW )
+  set(LLVM_REQUIRES_EH 1)
+endif()
 
 add_llvm_library(LLVMSupport
   APFloat.cpp
@@ -49,4 +52,51 @@
   regexec.c
   regfree.c
   regstrlcpy.c
+
+# System
+  Alarm.cpp
+  Atomic.cpp
+  Disassembler.cpp
+  DynamicLibrary.cpp
+  Errno.cpp
+  Host.cpp
+  IncludeFile.cpp
+  Memory.cpp
+  Mutex.cpp
+  Path.cpp
+  Process.cpp
+  Program.cpp
+  RWMutex.cpp
+  SearchForAddressOfSpecialSymbol.cpp
+  Signals.cpp
+  system_error.cpp
+  ThreadLocal.cpp
+  Threading.cpp
+  TimeValue.cpp
+  Valgrind.cpp
+  Unix/Alarm.inc
+  Unix/Host.inc
+  Unix/Memory.inc
+  Unix/Mutex.inc
+  Unix/Path.inc
+  Unix/Process.inc
+  Unix/Program.inc
+  Unix/RWMutex.inc
+  Unix/Signals.inc
+  Unix/system_error.inc
+  Unix/ThreadLocal.inc
+  Unix/TimeValue.inc
+  Windows/Alarm.inc
+  Windows/DynamicLibrary.inc
+  Windows/Host.inc
+  Windows/Memory.inc
+  Windows/Mutex.inc
+  Windows/Path.inc
+  Windows/Process.inc
+  Windows/Program.inc
+  Windows/RWMutex.inc
+  Windows/Signals.inc
+  Windows/system_error.inc
+  Windows/ThreadLocal.inc
+  Windows/TimeValue.inc
   )
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 38ef084..a99e46d 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -23,8 +23,8 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/System/Host.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Host.h"
+#include "llvm/Support/Path.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallString.h"
diff --git a/lib/Support/CrashRecoveryContext.cpp b/lib/Support/CrashRecoveryContext.cpp
index f24d6bd..bf8ca3f 100644
--- a/lib/Support/CrashRecoveryContext.cpp
+++ b/lib/Support/CrashRecoveryContext.cpp
@@ -10,8 +10,8 @@
 #include "llvm/Support/CrashRecoveryContext.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Config/config.h"
-#include "llvm/System/Mutex.h"
-#include "llvm/System/ThreadLocal.h"
+#include "llvm/Support/Mutex.h"
+#include "llvm/Support/ThreadLocal.h"
 #include <setjmp.h>
 #include <cstdio>
 using namespace llvm;
diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp
index 7f48f8a..9fdb12e 100644
--- a/lib/Support/Debug.cpp
+++ b/lib/Support/Debug.cpp
@@ -26,7 +26,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/circular_raw_ostream.h"
-#include "llvm/System/Signals.h"
+#include "llvm/Support/Signals.h"
 
 using namespace llvm;
 
diff --git a/lib/System/Disassembler.cpp b/lib/Support/Disassembler.cpp
similarity index 97%
rename from lib/System/Disassembler.cpp
rename to lib/Support/Disassembler.cpp
index 139e3be..6362aff 100644
--- a/lib/System/Disassembler.cpp
+++ b/lib/Support/Disassembler.cpp
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Config/config.h"
-#include "llvm/System/Disassembler.h"
+#include "llvm/Support/Disassembler.h"
 
 #include <cassert>
 #include <iomanip>
diff --git a/lib/System/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp
similarity index 97%
rename from lib/System/DynamicLibrary.cpp
rename to lib/Support/DynamicLibrary.cpp
index 33f8633..cd9927a 100644
--- a/lib/System/DynamicLibrary.cpp
+++ b/lib/Support/DynamicLibrary.cpp
@@ -14,8 +14,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/DynamicLibrary.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/DynamicLibrary.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/Config/config.h"
 #include <cstdio>
 #include <cstring>
@@ -47,7 +47,7 @@
 
 #ifdef LLVM_ON_WIN32
 
-#include "Win32/DynamicLibrary.inc"
+#include "Windows/DynamicLibrary.inc"
 
 #else
 
@@ -117,7 +117,7 @@
     std::map<std::string, void *>::iterator I =
       ExplicitSymbols->find(symbolName);
     std::map<std::string, void *>::iterator E = ExplicitSymbols->end();
-  
+
     if (I != E)
       return I->second;
   }
@@ -146,7 +146,7 @@
    if (!strcmp(symbolName, #SYM)) return &SYM
 
 // On linux we have a weird situation. The stderr/out/in symbols are both
-// macros and global variables because of standards requirements. So, we 
+// macros and global variables because of standards requirements. So, we
 // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
 #if defined(__linux__)
   {
diff --git a/lib/System/Errno.cpp b/lib/Support/Errno.cpp
similarity index 98%
rename from lib/System/Errno.cpp
rename to lib/Support/Errno.cpp
index 68f66f6..312d91e 100644
--- a/lib/System/Errno.cpp
+++ b/lib/Support/Errno.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Errno.h"
+#include "llvm/Support/Errno.h"
 #include "llvm/Config/config.h"     // Get autoconf configuration settings
 
 #if HAVE_STRING_H
diff --git a/lib/Support/ErrorHandling.cpp b/lib/Support/ErrorHandling.cpp
index 66b2c83..3579546 100644
--- a/lib/Support/ErrorHandling.cpp
+++ b/lib/Support/ErrorHandling.cpp
@@ -16,8 +16,8 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Signals.h"
-#include "llvm/System/Threading.h"
+#include "llvm/Support/Signals.h"
+#include "llvm/Support/Threading.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Config/config.h"
 #include <cassert>
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp
index 1bde2fe..7220085 100644
--- a/lib/Support/FileUtilities.cpp
+++ b/lib/Support/FileUtilities.cpp
@@ -15,7 +15,7 @@
 #include "llvm/Support/FileUtilities.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/SmallString.h"
 #include <cstdlib>
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp
index 11a1de4..a4f80a9 100644
--- a/lib/Support/FoldingSet.cpp
+++ b/lib/Support/FoldingSet.cpp
@@ -18,7 +18,7 @@
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/System/Host.h"
+#include "llvm/Support/Host.h"
 #include <cassert>
 #include <cstring>
 using namespace llvm;
diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp
index 79e978a..0dba28a 100644
--- a/lib/Support/GraphWriter.cpp
+++ b/lib/Support/GraphWriter.cpp
@@ -12,8 +12,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/GraphWriter.h"
-#include "llvm/System/Path.h"
-#include "llvm/System/Program.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Program.h"
 #include "llvm/Config/config.h"
 using namespace llvm;
 
diff --git a/lib/System/Host.cpp b/lib/Support/Host.cpp
similarity index 99%
rename from lib/System/Host.cpp
rename to lib/Support/Host.cpp
index 17384a1..4dacf96 100644
--- a/lib/System/Host.cpp
+++ b/lib/Support/Host.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Host.h"
+#include "llvm/Support/Host.h"
 #include "llvm/Config/config.h"
 #include <string.h>
 
@@ -20,7 +20,7 @@
 #include "Unix/Host.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/Host.inc"
+#include "Windows/Host.inc"
 #endif
 #ifdef _MSC_VER
 #include <intrin.h>
diff --git a/lib/System/IncludeFile.cpp b/lib/Support/IncludeFile.cpp
similarity index 87%
rename from lib/System/IncludeFile.cpp
rename to lib/Support/IncludeFile.cpp
index 8258d40..e41d1f0 100644
--- a/lib/System/IncludeFile.cpp
+++ b/lib/Support/IncludeFile.cpp
@@ -11,10 +11,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/IncludeFile.h"
+#include "llvm/Support/IncludeFile.h"
 
 using namespace llvm;
 
 // This constructor is used to ensure linking of other modules. See the
-// llvm/System/IncludeFile.h header for details. 
+// llvm/System/IncludeFile.h header for details.
 IncludeFile::IncludeFile(const void*) {}
diff --git a/lib/Support/Makefile b/lib/Support/Makefile
index 48c21f4..d68e500 100644
--- a/lib/Support/Makefile
+++ b/lib/Support/Makefile
@@ -14,4 +14,9 @@
 ## FIXME: This only requires RTTI because tblgen uses it.  Fix that.
 REQUIRES_RTTI = 1
 
+EXTRA_DIST = Unix Win32 README.txt
+
 include $(LEVEL)/Makefile.common
+
+CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts))
+CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts))
diff --git a/lib/Support/ManagedStatic.cpp b/lib/Support/ManagedStatic.cpp
index 4e655a0..c767c15 100644
--- a/lib/Support/ManagedStatic.cpp
+++ b/lib/Support/ManagedStatic.cpp
@@ -13,7 +13,7 @@
 
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Config/config.h"
-#include "llvm/System/Atomic.h"
+#include "llvm/Support/Atomic.h"
 #include <cassert>
 using namespace llvm;
 
diff --git a/lib/System/Memory.cpp b/lib/Support/Memory.cpp
similarity index 95%
rename from lib/System/Memory.cpp
rename to lib/Support/Memory.cpp
index ef23b8d..a9689b2 100644
--- a/lib/System/Memory.cpp
+++ b/lib/Support/Memory.cpp
@@ -12,8 +12,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Memory.h"
-#include "llvm/System/Valgrind.h"
+#include "llvm/Support/Memory.h"
+#include "llvm/Support/Valgrind.h"
 #include "llvm/Config/config.h"
 
 namespace llvm {
@@ -25,7 +25,7 @@
 #include "Unix/Memory.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/Memory.inc"
+#include "Windows/Memory.inc"
 #endif
 
 extern "C" void sys_icache_invalidate(const void *Addr, size_t len);
@@ -35,7 +35,7 @@
 /// platforms.
 void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr,
                                                    size_t Len) {
-  
+
 // icache invalidation for PPC and ARM.
 #if defined(__APPLE__)
 
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index 5b701a5..07a5ed4 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -15,10 +15,10 @@
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/MathExtras.h"
-#include "llvm/System/Errno.h"
-#include "llvm/System/Path.h"
-#include "llvm/System/Process.h"
-#include "llvm/System/Program.h"
+#include "llvm/Support/Errno.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Process.h"
+#include "llvm/Support/Program.h"
 #include <cassert>
 #include <cstdio>
 #include <cstring>
@@ -203,14 +203,14 @@
     if (ErrStr) *ErrStr = sys::StrError();
     return 0;
   }
-  
+
   return getOpenFile(FD, Filename, ErrStr, FileSize);
 }
-  
+
 MemoryBuffer *MemoryBuffer::getOpenFile(int FD, const char *Filename,
                                         std::string *ErrStr, int64_t FileSize) {
   FileCloser FC(FD); // Close FD on return.
-  
+
   // If we don't know the file size, use fstat to find out.  fstat on an open
   // file descriptor is cheaper than stat on a random path.
   if (FileSize == -1) {
@@ -222,8 +222,8 @@
     }
     FileSize = FileInfo.st_size;
   }
-  
-  
+
+
   // If the file is large, try to use mmap to read it in.  We don't use mmap
   // for small files, because this can severely fragment our address space. Also
   // don't try to map files that are exactly a multiple of the system page size,
diff --git a/lib/System/Mutex.cpp b/lib/Support/Mutex.cpp
similarity index 98%
rename from lib/System/Mutex.cpp
rename to lib/Support/Mutex.cpp
index 8ccd6e5..488868f 100644
--- a/lib/System/Mutex.cpp
+++ b/lib/Support/Mutex.cpp
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Config/config.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 
 //===----------------------------------------------------------------------===//
 //=== WARNING: Implementation here must contain only TRULY operating system
@@ -149,9 +149,8 @@
 #elif defined(LLVM_ON_UNIX)
 #include "Unix/Mutex.inc"
 #elif defined( LLVM_ON_WIN32)
-#include "Win32/Mutex.inc"
+#include "Windows/Mutex.inc"
 #else
 #warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in System/Mutex.cpp
 #endif
 #endif
-
diff --git a/lib/System/Path.cpp b/lib/Support/Path.cpp
similarity index 98%
rename from lib/System/Path.cpp
rename to lib/Support/Path.cpp
index ba47b51..394e013 100644
--- a/lib/System/Path.cpp
+++ b/lib/Support/Path.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Path.h"
+#include "llvm/Support/Path.h"
 #include "llvm/Config/config.h"
 #include <cassert>
 #include <cstring>
@@ -292,6 +292,5 @@
 #include "Unix/Path.inc"
 #endif
 #if defined(LLVM_ON_WIN32)
-#include "Win32/Path.inc"
+#include "Windows/Path.inc"
 #endif
-
diff --git a/lib/Support/PluginLoader.cpp b/lib/Support/PluginLoader.cpp
index 36caecf..2924cfa 100644
--- a/lib/Support/PluginLoader.cpp
+++ b/lib/Support/PluginLoader.cpp
@@ -15,8 +15,8 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PluginLoader.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/DynamicLibrary.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/DynamicLibrary.h"
+#include "llvm/Support/Mutex.h"
 #include <vector>
 using namespace llvm;
 
diff --git a/lib/Support/PrettyStackTrace.cpp b/lib/Support/PrettyStackTrace.cpp
index 3c8a108..2f46b9e 100644
--- a/lib/Support/PrettyStackTrace.cpp
+++ b/lib/Support/PrettyStackTrace.cpp
@@ -15,8 +15,8 @@
 #include "llvm/Config/config.h"     // Get autoconf configuration settings
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Signals.h"
-#include "llvm/System/ThreadLocal.h"
+#include "llvm/Support/Signals.h"
+#include "llvm/Support/ThreadLocal.h"
 #include "llvm/ADT/SmallString.h"
 
 #ifdef HAVE_CRASHREPORTERCLIENT_H
diff --git a/lib/System/Process.cpp b/lib/Support/Process.cpp
similarity index 93%
rename from lib/System/Process.cpp
rename to lib/Support/Process.cpp
index e93b2af..88ca7c3 100644
--- a/lib/System/Process.cpp
+++ b/lib/Support/Process.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Process.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Config/config.h"
 
 namespace llvm {
@@ -29,5 +29,5 @@
 #include "Unix/Process.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/Process.inc"
+#include "Windows/Process.inc"
 #endif
diff --git a/lib/System/Program.cpp b/lib/Support/Program.cpp
similarity index 96%
rename from lib/System/Program.cpp
rename to lib/Support/Program.cpp
index 90aba76..01860b0 100644
--- a/lib/System/Program.cpp
+++ b/lib/Support/Program.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Program.h"
+#include "llvm/Support/Program.h"
 #include "llvm/Config/config.h"
 using namespace llvm;
 using namespace sys;
@@ -52,5 +52,5 @@
 #include "Unix/Program.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/Program.inc"
+#include "Windows/Program.inc"
 #endif
diff --git a/lib/System/README.txt b/lib/Support/README.txt.system
similarity index 89%
rename from lib/System/README.txt
rename to lib/Support/README.txt.system
index eacb200..7a906b8 100644
--- a/lib/System/README.txt
+++ b/lib/Support/README.txt.system
@@ -9,15 +9,15 @@
 The software located here, of necessity, has very specific and stringent design
 rules. Violation of these rules means that cracks in the shield could form and
 the primary goal of the library is defeated. By consistently using this library,
-LLVM becomes more easily ported to new platforms since the only thing requiring 
+LLVM becomes more easily ported to new platforms since the only thing requiring
 porting is this library.
 
 Complete documentation for the library can be found in the file:
-  llvm/docs/SystemLibrary.html 
+  llvm/docs/SystemLibrary.html
 or at this URL:
   http://llvm.org/docs/SystemLibrary.html
 
-While we recommend that you read the more detailed documentation, for the 
+While we recommend that you read the more detailed documentation, for the
 impatient, here's a high level summary of the library's requirements.
 
  1. No system header files are to be exposed through the interface.
@@ -31,13 +31,13 @@
  9. No duplicate function impementations are permitted within an operating
     system class.
 
-To accomplish these requirements, the library has numerous design criteria that 
+To accomplish these requirements, the library has numerous design criteria that
 must be satisfied. Here's a high level summary of the library's design criteria:
 
  1. No unused functionality (only what LLVM needs)
  2. High-Level Interfaces
  3. Use Opaque Classes
- 4. Common Implementations</a></li>
- 5. Multiple Implementations</a></li>
- 6. Minimize Memory Allocation</a></li>
+ 4. Common Implementations
+ 5. Multiple Implementations
+ 6. Minimize Memory Allocation
  7. No Virtual Methods
diff --git a/lib/System/RWMutex.cpp b/lib/Support/RWMutex.cpp
similarity index 98%
rename from lib/System/RWMutex.cpp
rename to lib/Support/RWMutex.cpp
index deb0470..fc02f9c 100644
--- a/lib/System/RWMutex.cpp
+++ b/lib/Support/RWMutex.cpp
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Config/config.h"
-#include "llvm/System/RWMutex.h"
+#include "llvm/Support/RWMutex.h"
 #include <cstring>
 
 //===----------------------------------------------------------------------===//
@@ -150,7 +150,7 @@
 #elif defined(LLVM_ON_UNIX)
 #include "Unix/RWMutex.inc"
 #elif defined( LLVM_ON_WIN32)
-#include "Win32/RWMutex.inc"
+#include "Windows/RWMutex.inc"
 #else
 #warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in System/Mutex.cpp
 #endif
diff --git a/lib/System/SearchForAddressOfSpecialSymbol.cpp b/lib/Support/SearchForAddressOfSpecialSymbol.cpp
similarity index 100%
rename from lib/System/SearchForAddressOfSpecialSymbol.cpp
rename to lib/Support/SearchForAddressOfSpecialSymbol.cpp
diff --git a/lib/System/Signals.cpp b/lib/Support/Signals.cpp
similarity index 93%
rename from lib/System/Signals.cpp
rename to lib/Support/Signals.cpp
index d345b0a..a3af37d 100644
--- a/lib/System/Signals.cpp
+++ b/lib/Support/Signals.cpp
@@ -12,7 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Signals.h"
+#include "llvm/Support/Signals.h"
 #include "llvm/Config/config.h"
 
 namespace llvm {
@@ -30,5 +30,5 @@
 #include "Unix/Signals.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/Signals.inc"
+#include "Windows/Signals.inc"
 #endif
diff --git a/lib/Support/Statistic.cpp b/lib/Support/Statistic.cpp
index e32ab74..f0ed626 100644
--- a/lib/Support/Statistic.cpp
+++ b/lib/Support/Statistic.cpp
@@ -26,7 +26,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/ADT/StringExtras.h"
 #include <algorithm>
 #include <cstring>
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index 9646d75..54b5e97 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -13,8 +13,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/SystemUtils.h"
-#include "llvm/System/Process.h"
-#include "llvm/System/Program.h"
+#include "llvm/Support/Process.h"
+#include "llvm/Support/Program.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
diff --git a/lib/Support/TargetRegistry.cpp b/lib/Support/TargetRegistry.cpp
index 5896447..293a5d7 100644
--- a/lib/Support/TargetRegistry.cpp
+++ b/lib/Support/TargetRegistry.cpp
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Target/TargetRegistry.h"
-#include "llvm/System/Host.h"
+#include "llvm/Support/Host.h"
 #include <cassert>
 using namespace llvm;
 
diff --git a/lib/System/ThreadLocal.cpp b/lib/Support/ThreadLocal.cpp
similarity index 96%
rename from lib/System/ThreadLocal.cpp
rename to lib/Support/ThreadLocal.cpp
index f6a55a1..6b43048 100644
--- a/lib/System/ThreadLocal.cpp
+++ b/lib/Support/ThreadLocal.cpp
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Config/config.h"
-#include "llvm/System/ThreadLocal.h"
+#include "llvm/Support/ThreadLocal.h"
 
 //===----------------------------------------------------------------------===//
 //=== WARNING: Implementation here must contain only TRULY operating system
@@ -77,9 +77,8 @@
 #elif defined(LLVM_ON_UNIX)
 #include "Unix/ThreadLocal.inc"
 #elif defined( LLVM_ON_WIN32)
-#include "Win32/ThreadLocal.inc"
+#include "Windows/ThreadLocal.inc"
 #else
 #warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in System/ThreadLocal.cpp
 #endif
 #endif
-
diff --git a/lib/System/Threading.cpp b/lib/Support/Threading.cpp
similarity index 95%
rename from lib/System/Threading.cpp
rename to lib/Support/Threading.cpp
index 3b0bc72..c2f8554 100644
--- a/lib/System/Threading.cpp
+++ b/lib/Support/Threading.cpp
@@ -11,9 +11,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Threading.h"
-#include "llvm/System/Atomic.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Threading.h"
+#include "llvm/Support/Atomic.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/Config/config.h"
 #include <cassert>
 
@@ -28,7 +28,7 @@
   assert(!multithreaded_mode && "Already multithreaded!");
   multithreaded_mode = true;
   global_lock = new sys::Mutex(true);
-  
+
   // We fence here to ensure that all initialization is complete BEFORE we
   // return from llvm_start_multithreaded().
   sys::MemoryFence();
@@ -41,11 +41,11 @@
 void llvm::llvm_stop_multithreaded() {
 #ifdef LLVM_MULTITHREADED
   assert(multithreaded_mode && "Not currently multithreaded!");
-  
+
   // We fence here to insure that all threaded operations are complete BEFORE we
   // return from llvm_stop_multithreaded().
   sys::MemoryFence();
-  
+
   multithreaded_mode = false;
   delete global_lock;
 #endif
@@ -98,7 +98,7 @@
 
   // Wait for the thread and clean up.
   ::pthread_join(Thread, 0);
-  
+
  error:
   ::pthread_attr_destroy(&Attr);
 }
diff --git a/lib/System/TimeValue.cpp b/lib/Support/TimeValue.cpp
similarity index 95%
rename from lib/System/TimeValue.cpp
rename to lib/Support/TimeValue.cpp
index cf4984c..1a0f7bc 100644
--- a/lib/System/TimeValue.cpp
+++ b/lib/Support/TimeValue.cpp
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/TimeValue.h"
+#include "llvm/Support/TimeValue.h"
 #include "llvm/Config/config.h"
 
 namespace llvm {
@@ -53,6 +53,5 @@
 #include "Unix/TimeValue.inc"
 #endif
 #ifdef LLVM_ON_WIN32
-#include "Win32/TimeValue.inc"
+#include "Windows/TimeValue.inc"
 #endif
-
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp
index 44ee177..a9ed5ee 100644
--- a/lib/Support/Timer.cpp
+++ b/lib/Support/Timer.cpp
@@ -17,8 +17,8 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Format.h"
-#include "llvm/System/Mutex.h"
-#include "llvm/System/Process.h"
+#include "llvm/Support/Mutex.h"
+#include "llvm/Support/Process.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/StringMap.h"
 using namespace llvm;
diff --git a/lib/Support/ToolOutputFile.cpp b/lib/Support/ToolOutputFile.cpp
index 5b5ee66..e7ca927 100644
--- a/lib/Support/ToolOutputFile.cpp
+++ b/lib/Support/ToolOutputFile.cpp
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/ToolOutputFile.h"
-#include "llvm/System/Signals.h"
+#include "llvm/Support/Signals.h"
 using namespace llvm;
 
 tool_output_file::CleanupInstaller::CleanupInstaller(const char *filename)
diff --git a/lib/System/Unix/Alarm.inc b/lib/Support/Unix/Alarm.inc
similarity index 100%
rename from lib/System/Unix/Alarm.inc
rename to lib/Support/Unix/Alarm.inc
diff --git a/lib/System/Unix/Host.inc b/lib/Support/Unix/Host.inc
similarity index 97%
rename from lib/System/Unix/Host.inc
rename to lib/Support/Unix/Host.inc
index c76d6a4..ca0de9c 100644
--- a/lib/System/Unix/Host.inc
+++ b/lib/Support/Unix/Host.inc
@@ -39,7 +39,7 @@
 
   StringRef HostTripleString(LLVM_HOSTTRIPLE);
   std::pair<StringRef, StringRef> ArchSplit = HostTripleString.split('-');
-  
+
   // Normalize the arch, since the host triple may not actually match the host.
   std::string Arch = ArchSplit.first;
 
@@ -77,16 +77,16 @@
   Triple += ArchSplit.second;
 
   // Force i<N>86 to i386.
-  if (Triple[0] == 'i' && isdigit(Triple[1]) && 
+  if (Triple[0] == 'i' && isdigit(Triple[1]) &&
       Triple[2] == '8' && Triple[3] == '6')
     Triple[1] = '3';
 
   // On darwin, we want to update the version to match that of the
-  // host.    
+  // host.
   std::string::size_type DarwinDashIdx = Triple.find("-darwin");
   if (DarwinDashIdx != std::string::npos) {
     Triple.resize(DarwinDashIdx + strlen("-darwin"));
-    
+
     // Only add the major part of the os version.
     std::string Version = getOSVersion();
     Triple += Version.substr(0, Version.find('.'));
diff --git a/lib/System/Unix/Memory.inc b/lib/Support/Unix/Memory.inc
similarity index 96%
rename from lib/System/Unix/Memory.inc
rename to lib/Support/Unix/Memory.inc
index 1b038f9..4312d67 100644
--- a/lib/System/Unix/Memory.inc
+++ b/lib/Support/Unix/Memory.inc
@@ -1,10 +1,10 @@
 //===- Unix/Memory.cpp - Generic UNIX System Configuration ------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file defines some functions for various memory management utilities.
@@ -12,8 +12,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "Unix.h"
-#include "llvm/System/DataTypes.h"
-#include "llvm/System/Process.h"
+#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/Process.h"
 
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
@@ -28,7 +28,7 @@
 /// to emit code to the memory then jump to it.  Getting this type of memory
 /// is very OS specific.
 ///
-llvm::sys::MemoryBlock 
+llvm::sys::MemoryBlock
 llvm::sys::Memory::AllocateRWX(size_t NumBytes, const MemoryBlock* NearBlock,
                                std::string *ErrMsg) {
   if (NumBytes == 0) return MemoryBlock();
@@ -54,7 +54,7 @@
 #endif
   ;
 
-  void* start = NearBlock ? (unsigned char*)NearBlock->base() + 
+  void* start = NearBlock ? (unsigned char*)NearBlock->base() +
                             NearBlock->size() : 0;
 
 #if defined(__APPLE__) && defined(__arm__)
diff --git a/lib/System/Unix/Mutex.inc b/lib/Support/Unix/Mutex.inc
similarity index 97%
rename from lib/System/Unix/Mutex.inc
rename to lib/Support/Unix/Mutex.inc
index 4a5e28d..5c50697 100644
--- a/lib/System/Unix/Mutex.inc
+++ b/lib/Support/Unix/Mutex.inc
@@ -1,10 +1,10 @@
 //===- llvm/System/Unix/Mutex.inc - Unix Mutex Implementation ---*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Unix specific (non-pthread) Mutex class.
@@ -28,13 +28,13 @@
 {
 }
 
-bool 
+bool
 MutexImpl::release()
 {
   return true;
 }
 
-bool 
+bool
 MutexImpl::tryacquire( void )
 {
   return true;
diff --git a/lib/System/Unix/Path.inc b/lib/Support/Unix/Path.inc
similarity index 100%
rename from lib/System/Unix/Path.inc
rename to lib/Support/Unix/Path.inc
diff --git a/lib/System/Unix/Process.inc b/lib/Support/Unix/Process.inc
similarity index 97%
rename from lib/System/Unix/Process.inc
rename to lib/Support/Unix/Process.inc
index cf6a47a..5cdb11c 100644
--- a/lib/System/Unix/Process.inc
+++ b/lib/Support/Unix/Process.inc
@@ -1,10 +1,10 @@
 //===- Unix/Process.cpp - Unix Process Implementation --------- -*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file provides the generic Unix implementation of the Process class.
@@ -41,8 +41,8 @@
 using namespace llvm;
 using namespace sys;
 
-unsigned 
-Process::GetPageSize() 
+unsigned
+Process::GetPageSize()
 {
 #if defined(__CYGWIN__)
   // On Cygwin, getpagesize() returns 64k but the page size for the purposes of
@@ -104,20 +104,20 @@
 }
 
 void
-Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time, 
+Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time,
                       TimeValue& sys_time)
 {
   elapsed = TimeValue::now();
 #if defined(HAVE_GETRUSAGE)
   struct rusage usage;
   ::getrusage(RUSAGE_SELF, &usage);
-  user_time = TimeValue( 
-    static_cast<TimeValue::SecondsType>( usage.ru_utime.tv_sec ), 
-    static_cast<TimeValue::NanoSecondsType>( usage.ru_utime.tv_usec * 
+  user_time = TimeValue(
+    static_cast<TimeValue::SecondsType>( usage.ru_utime.tv_sec ),
+    static_cast<TimeValue::NanoSecondsType>( usage.ru_utime.tv_usec *
       TimeValue::NANOSECONDS_PER_MICROSECOND ) );
-  sys_time = TimeValue( 
-    static_cast<TimeValue::SecondsType>( usage.ru_stime.tv_sec ), 
-    static_cast<TimeValue::NanoSecondsType>( usage.ru_stime.tv_usec * 
+  sys_time = TimeValue(
+    static_cast<TimeValue::SecondsType>( usage.ru_stime.tv_sec ),
+    static_cast<TimeValue::NanoSecondsType>( usage.ru_stime.tv_usec *
       TimeValue::NANOSECONDS_PER_MICROSECOND ) );
 #else
 #warning Cannot get usage times on this platform
@@ -159,14 +159,14 @@
   exception_port_t OriginalPorts[EXC_TYPES_COUNT];
   exception_behavior_t OriginalBehaviors[EXC_TYPES_COUNT];
   thread_state_flavor_t OriginalFlavors[EXC_TYPES_COUNT];
-  kern_return_t err = 
+  kern_return_t err =
     task_get_exception_ports(mach_task_self(), EXC_MASK_ALL, OriginalMasks,
                              &Count, OriginalPorts, OriginalBehaviors,
                              OriginalFlavors);
   if (err == KERN_SUCCESS) {
     // replace each with MACH_PORT_NULL.
     for (unsigned i = 0; i != Count; ++i)
-      task_set_exception_ports(mach_task_self(), OriginalMasks[i], 
+      task_set_exception_ports(mach_task_self(), OriginalMasks[i],
                                MACH_PORT_NULL, OriginalBehaviors[i],
                                OriginalFlavors[i]);
   }
diff --git a/lib/System/Unix/Program.inc b/lib/Support/Unix/Program.inc
similarity index 100%
rename from lib/System/Unix/Program.inc
rename to lib/Support/Unix/Program.inc
diff --git a/lib/System/Unix/README.txt b/lib/Support/Unix/README.txt
similarity index 94%
rename from lib/System/Unix/README.txt
rename to lib/Support/Unix/README.txt
index b3bace4..3d547c2 100644
--- a/lib/System/Unix/README.txt
+++ b/lib/Support/Unix/README.txt
@@ -1,13 +1,13 @@
-llvm/lib/System/Unix README
+llvm/lib/Support/Unix README
 ===========================
 
 This directory provides implementations of the lib/System classes that
-are common to two or more variants of UNIX. For example, the directory 
+are common to two or more variants of UNIX. For example, the directory
 structure underneath this directory could look like this:
 
 Unix           - only code that is truly generic to all UNIX platforms
   Posix        - code that is specific to Posix variants of UNIX
-  SUS          - code that is specific to the Single Unix Specification 
+  SUS          - code that is specific to the Single Unix Specification
   SysV         - code that is specific to System V variants of UNIX
 
 As a rule, only those directories actually needing to be created should be
diff --git a/lib/System/Unix/RWMutex.inc b/lib/Support/Unix/RWMutex.inc
similarity index 98%
rename from lib/System/Unix/RWMutex.inc
rename to lib/Support/Unix/RWMutex.inc
index e83d41e..ee9853e 100644
--- a/lib/System/Unix/RWMutex.inc
+++ b/lib/Support/Unix/RWMutex.inc
@@ -1,10 +1,10 @@
 //= llvm/System/Unix/RWMutex.inc - Unix Reader/Writer Mutual Exclusion Lock  =//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Unix specific (non-pthread) RWMutex class.
diff --git a/lib/System/Unix/Signals.inc b/lib/Support/Unix/Signals.inc
similarity index 98%
rename from lib/System/Unix/Signals.inc
rename to lib/Support/Unix/Signals.inc
index 997d478..0a61759 100644
--- a/lib/System/Unix/Signals.inc
+++ b/lib/Support/Unix/Signals.inc
@@ -1,10 +1,10 @@
 //===- Signals.cpp - Generic Unix Signals Implementation -----*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file defines some helpful functions for dealing with the possibility of
@@ -14,7 +14,7 @@
 
 #include "Unix.h"
 #include "llvm/ADT/STLExtras.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include <vector>
 #include <algorithm>
 #if HAVE_EXECINFO_H
@@ -28,7 +28,7 @@
 #endif
 #if HAVE_DLFCN_H && __GNUG__
 #include <dlfcn.h>
-#include <cxxabi.h> 
+#include <cxxabi.h>
 #endif
 using namespace llvm;
 
@@ -82,11 +82,11 @@
          "Out of space for signal handlers!");
 
   struct sigaction NewHandler;
-  
+
   NewHandler.sa_handler = SignalHandler;
   NewHandler.sa_flags = SA_NODEFER|SA_RESETHAND;
-  sigemptyset(&NewHandler.sa_mask); 
-  
+  sigemptyset(&NewHandler.sa_mask);
+
   // Install the new handler, save the old one in RegisteredSignalInfo.
   sigaction(Signal, &NewHandler,
             &RegisteredSignalInfo[NumRegisteredSignals].SA);
@@ -144,7 +144,7 @@
       IF();        // run the interrupt function.
       return;
     }
-    
+
     SignalsMutex.release();
     raise(Sig);   // Execute the default handler.
     return;
@@ -205,7 +205,7 @@
 // trace so that the user has an indication of why and where we died.
 //
 // On glibc systems we have the 'backtrace' function, which works nicely, but
-// doesn't demangle symbols.  
+// doesn't demangle symbols.
 static void PrintStackTrace(void *) {
 #ifdef HAVE_BACKTRACE
   static void* StackTrace[256];
diff --git a/lib/System/Unix/ThreadLocal.inc b/lib/Support/Unix/ThreadLocal.inc
similarity index 98%
rename from lib/System/Unix/ThreadLocal.inc
rename to lib/Support/Unix/ThreadLocal.inc
index 6769520..f009b72 100644
--- a/lib/System/Unix/ThreadLocal.inc
+++ b/lib/Support/Unix/ThreadLocal.inc
@@ -1,10 +1,10 @@
 //=== llvm/System/Unix/ThreadLocal.inc - Unix Thread Local Data -*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Unix specific (non-pthread) ThreadLocal class.
diff --git a/lib/System/Unix/TimeValue.inc b/lib/Support/Unix/TimeValue.inc
similarity index 92%
rename from lib/System/Unix/TimeValue.inc
rename to lib/Support/Unix/TimeValue.inc
index d8cc8f5..5cf5a9d 100644
--- a/lib/System/Unix/TimeValue.inc
+++ b/lib/Support/Unix/TimeValue.inc
@@ -1,10 +1,10 @@
 //===- Unix/TimeValue.cpp - Unix TimeValue Implementation -------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Unix specific portion of the TimeValue class.
@@ -26,7 +26,7 @@
 
   time_t ourTime = time_t(this->toEpochTime());
 #ifdef __hpux
-// note that the following line needs -D_REENTRANT on HP-UX to be picked up 
+// note that the following line needs -D_REENTRANT on HP-UX to be picked up
   asctime_r(localtime(&ourTime), buffer);
 #else
   ::asctime_r(::localtime(&ourTime), buffer);
@@ -43,13 +43,13 @@
     // This is *really* unlikely to occur because the only gettimeofday
     // errors concern the timezone parameter which we're passing in as 0.
     // In the unlikely case it does happen, just return MinTime, no error
-    // message needed. 
+    // message needed.
     return MinTime;
   }
 
   return TimeValue(
-    static_cast<TimeValue::SecondsType>( the_time.tv_sec + PosixZeroTime.seconds_ ), 
-    static_cast<TimeValue::NanoSecondsType>( the_time.tv_usec * 
+    static_cast<TimeValue::SecondsType>( the_time.tv_sec + PosixZeroTime.seconds_ ),
+    static_cast<TimeValue::NanoSecondsType>( the_time.tv_usec *
       NANOSECONDS_PER_MICROSECOND ) );
 }
 
diff --git a/lib/System/Unix/Unix.h b/lib/Support/Unix/Unix.h
similarity index 100%
rename from lib/System/Unix/Unix.h
rename to lib/Support/Unix/Unix.h
diff --git a/lib/System/Unix/system_error.inc b/lib/Support/Unix/system_error.inc
similarity index 100%
rename from lib/System/Unix/system_error.inc
rename to lib/Support/Unix/system_error.inc
diff --git a/lib/System/Valgrind.cpp b/lib/Support/Valgrind.cpp
similarity index 97%
rename from lib/System/Valgrind.cpp
rename to lib/Support/Valgrind.cpp
index c76cfe4..7034485 100644
--- a/lib/System/Valgrind.cpp
+++ b/lib/Support/Valgrind.cpp
@@ -13,7 +13,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/Valgrind.h"
+#include "llvm/Support/Valgrind.h"
 #include "llvm/Config/config.h"
 
 #if HAVE_VALGRIND_VALGRIND_H
diff --git a/lib/System/Win32/Alarm.inc b/lib/Support/Windows/Alarm.inc
similarity index 100%
rename from lib/System/Win32/Alarm.inc
rename to lib/Support/Windows/Alarm.inc
diff --git a/lib/System/Win32/DynamicLibrary.inc b/lib/Support/Windows/DynamicLibrary.inc
similarity index 97%
rename from lib/System/Win32/DynamicLibrary.inc
rename to lib/Support/Windows/DynamicLibrary.inc
index c9a89e5..5fad37a 100644
--- a/lib/System/Win32/DynamicLibrary.inc
+++ b/lib/Support/Windows/DynamicLibrary.inc
@@ -1,17 +1,17 @@
 //===- Win32/DynamicLibrary.cpp - Win32 DL Implementation -------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file provides the Win32 specific implementation of DynamicLibrary.
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 
 #ifdef __MINGW32__
  #include <imagehlp.h>
@@ -35,7 +35,7 @@
 using namespace sys;
 
 //===----------------------------------------------------------------------===//
-//=== WARNING: Implementation here must contain only Win32 specific code 
+//=== WARNING: Implementation here must contain only Win32 specific code
 //===          and must not be UNIX code.
 //===----------------------------------------------------------------------===//
 
@@ -50,7 +50,7 @@
 extern "C" {
 // Use old callback if:
 //  - Not using Visual Studio
-//  - Visual Studio 2005 or earlier but only if we are not using the Windows SDK 
+//  - Visual Studio 2005 or earlier but only if we are not using the Windows SDK
 //    or Windows SDK version is older than 6.0
 // Use new callback if:
 //  - Newer Visual Studio (comes with newer SDK).
@@ -89,7 +89,7 @@
 }
 
 bool DynamicLibrary::LoadLibraryPermanently(const char *filename,
-                                            std::string *ErrMsg) {                                            
+                                            std::string *ErrMsg) {
   if (filename) {
     HMODULE a_handle = LoadLibrary(filename);
 
@@ -143,7 +143,7 @@
 void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
   // First check symbols added via AddSymbol().
   if (ExplicitSymbols) {
-    std::map<std::string, void *>::iterator I = 
+    std::map<std::string, void *>::iterator I =
       ExplicitSymbols->find(symbolName);
     std::map<std::string, void *>::iterator E = ExplicitSymbols->end();
     if (I != E)
@@ -197,4 +197,3 @@
 }
 
 }
-
diff --git a/lib/System/Win32/Host.inc b/lib/Support/Windows/Host.inc
similarity index 96%
rename from lib/System/Win32/Host.inc
rename to lib/Support/Windows/Host.inc
index 18f00f8..5377c77 100644
--- a/lib/System/Win32/Host.inc
+++ b/lib/Support/Windows/Host.inc
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 #include <cstdio>
 #include <string>
 
diff --git a/lib/System/Win32/Memory.inc b/lib/Support/Windows/Memory.inc
similarity index 94%
rename from lib/System/Win32/Memory.inc
rename to lib/Support/Windows/Memory.inc
index 19fccbd..9f69e73 100644
--- a/lib/System/Win32/Memory.inc
+++ b/lib/Support/Windows/Memory.inc
@@ -1,10 +1,10 @@
 //===- Win32/Memory.cpp - Win32 Memory Implementation -----------*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file provides the Win32 specific implementation of various Memory
@@ -12,15 +12,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
-#include "llvm/System/DataTypes.h"
-#include "llvm/System/Process.h"
+#include "Windows.h"
+#include "llvm/Support/DataTypes.h"
+#include "llvm/Support/Process.h"
 
 namespace llvm {
 using namespace sys;
 
 //===----------------------------------------------------------------------===//
-//=== WARNING: Implementation here must contain only Win32 specific code 
+//=== WARNING: Implementation here must contain only Win32 specific code
 //===          and must not be UNIX code
 //===----------------------------------------------------------------------===//
 
diff --git a/lib/System/Win32/Mutex.inc b/lib/Support/Windows/Mutex.inc
similarity index 94%
rename from lib/System/Win32/Mutex.inc
rename to lib/Support/Windows/Mutex.inc
index 75f01fe..ff7d642 100644
--- a/lib/System/Win32/Mutex.inc
+++ b/lib/Support/Windows/Mutex.inc
@@ -1,10 +1,10 @@
 //===- llvm/System/Win32/Mutex.inc - Win32 Mutex Implementation -*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Win32 specific (non-pthread) Mutex class.
@@ -16,8 +16,8 @@
 //===          is guaranteed to work on *all* Win32 variants.
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
-#include "llvm/System/Mutex.h"
+#include "Windows.h"
+#include "llvm/Support/Mutex.h"
 
 namespace llvm {
 using namespace sys;
@@ -35,21 +35,21 @@
   data_ = 0;
 }
 
-bool 
+bool
 MutexImpl::acquire()
 {
   EnterCriticalSection((LPCRITICAL_SECTION)data_);
   return true;
 }
 
-bool 
+bool
 MutexImpl::release()
 {
   LeaveCriticalSection((LPCRITICAL_SECTION)data_);
   return true;
 }
 
-bool 
+bool
 MutexImpl::tryacquire()
 {
   return TryEnterCriticalSection((LPCRITICAL_SECTION)data_);
diff --git a/lib/System/Win32/Path.inc b/lib/Support/Windows/Path.inc
similarity index 99%
rename from lib/System/Win32/Path.inc
rename to lib/Support/Windows/Path.inc
index 8990a42..e517eec 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/Support/Windows/Path.inc
@@ -16,7 +16,7 @@
 //===          is guaranteed to work on *all* Win32 variants.
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 #include <malloc.h>
 #include <cstdio>
 
diff --git a/lib/System/Win32/Process.inc b/lib/Support/Windows/Process.inc
similarity index 97%
rename from lib/System/Win32/Process.inc
rename to lib/Support/Windows/Process.inc
index 15b41f0..06a7f00 100644
--- a/lib/System/Win32/Process.inc
+++ b/lib/Support/Windows/Process.inc
@@ -1,17 +1,17 @@
 //===- Win32/Process.cpp - Win32 Process Implementation ------- -*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file provides the Win32 specific implementation of the Process class.
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 #include <psapi.h>
 #include <malloc.h>
 #include <io.h>
@@ -25,7 +25,7 @@
 #endif
 
 //===----------------------------------------------------------------------===//
-//=== WARNING: Implementation here must contain only Win32 specific code 
+//=== WARNING: Implementation here must contain only Win32 specific code
 //===          and must not be UNIX code
 //===----------------------------------------------------------------------===//
 
@@ -51,13 +51,13 @@
   return static_cast<unsigned>(info.dwPageSize);
 }
 
-unsigned 
+unsigned
 Process::GetPageSize() {
   static const unsigned PageSize = GetPageSizeOnce();
   return PageSize;
 }
 
-size_t 
+size_t
 Process::GetMallocUsage()
 {
   _HEAPINFO hinfo;
@@ -86,7 +86,7 @@
   elapsed = TimeValue::now();
 
   uint64_t ProcCreate, ProcExit, KernelTime, UserTime;
-  GetProcessTimes(GetCurrentProcess(), (FILETIME*)&ProcCreate, 
+  GetProcessTimes(GetCurrentProcess(), (FILETIME*)&ProcCreate,
                   (FILETIME*)&ProcExit, (FILETIME*)&KernelTime,
                   (FILETIME*)&UserTime);
 
diff --git a/lib/System/Win32/Program.inc b/lib/Support/Windows/Program.inc
similarity index 99%
rename from lib/System/Win32/Program.inc
rename to lib/Support/Windows/Program.inc
index 2d6e665..0b92c78 100644
--- a/lib/System/Win32/Program.inc
+++ b/lib/Support/Windows/Program.inc
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 #include <cstdio>
 #include <malloc.h>
 #include <io.h>
diff --git a/lib/System/Win32/RWMutex.inc b/lib/Support/Windows/RWMutex.inc
similarity index 93%
rename from lib/System/Win32/RWMutex.inc
rename to lib/Support/Windows/RWMutex.inc
index e269226..82ae8af 100644
--- a/lib/System/Win32/RWMutex.inc
+++ b/lib/Support/Windows/RWMutex.inc
@@ -1,10 +1,10 @@
 //= llvm/System/Win32/Mutex.inc - Win32 Reader/Writer Mutual Exclusion Lock  =//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Win32 specific (non-pthread) RWMutex class.
@@ -16,10 +16,10 @@
 //===          is guaranteed to work on *all* Win32 variants.
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 
 // FIXME: Windows does not have reader-writer locks pre-Vista.  If you want
-// real reader-writer locks, you a pthreads implementation for Windows.
+// real reader-writer locks, you a threads implementation for Windows.
 
 namespace llvm {
 using namespace sys;
diff --git a/lib/System/Win32/Signals.inc b/lib/Support/Windows/Signals.inc
similarity index 99%
rename from lib/System/Win32/Signals.inc
rename to lib/Support/Windows/Signals.inc
index 1ad1769..c0e3eca 100644
--- a/lib/System/Win32/Signals.inc
+++ b/lib/Support/Windows/Signals.inc
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 #include <stdio.h>
 #include <vector>
 #include <algorithm>
@@ -323,4 +323,3 @@
   LeaveCriticalSection(&CriticalSection);
   return FALSE;
 }
-
diff --git a/lib/System/Win32/ThreadLocal.inc b/lib/Support/Windows/ThreadLocal.inc
similarity index 95%
rename from lib/System/Win32/ThreadLocal.inc
rename to lib/Support/Windows/ThreadLocal.inc
index e7e3cb7..53070ea 100644
--- a/lib/System/Win32/ThreadLocal.inc
+++ b/lib/Support/Windows/ThreadLocal.inc
@@ -1,10 +1,10 @@
 //= llvm/System/Win32/ThreadLocal.inc - Win32 Thread Local Data -*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Win32 specific (non-pthread) ThreadLocal class.
@@ -16,8 +16,8 @@
 //===          is guaranteed to work on *all* Win32 variants.
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
-#include "llvm/System/ThreadLocal.h"
+#include "Windows.h"
+#include "llvm/Support/ThreadLocal.h"
 
 namespace llvm {
 using namespace sys;
diff --git a/lib/System/Win32/TimeValue.inc b/lib/Support/Windows/TimeValue.inc
similarity index 97%
rename from lib/System/Win32/TimeValue.inc
rename to lib/Support/Windows/TimeValue.inc
index e37f111..1227552 100644
--- a/lib/System/Win32/TimeValue.inc
+++ b/lib/Support/Windows/TimeValue.inc
@@ -1,17 +1,17 @@
 //===- Win32/TimeValue.cpp - Win32 TimeValue Implementation -----*- C++ -*-===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file provides the Win32 implementation of the TimeValue class.
 //
 //===----------------------------------------------------------------------===//
 
-#include "Win32.h"
+#include "Windows.h"
 #include <time.h>
 
 namespace llvm {
diff --git a/lib/System/Win32/Win32.h b/lib/Support/Windows/Windows.h
similarity index 100%
rename from lib/System/Win32/Win32.h
rename to lib/Support/Windows/Windows.h
diff --git a/lib/System/Win32/system_error.inc b/lib/Support/Windows/system_error.inc
similarity index 100%
rename from lib/System/Win32/system_error.inc
rename to lib/Support/Windows/system_error.inc
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index d3d6539..0279f40 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -13,8 +13,8 @@
 
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Format.h"
-#include "llvm/System/Program.h"
-#include "llvm/System/Process.h"
+#include "llvm/Support/Program.h"
+#include "llvm/Support/Process.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Config/config.h"
diff --git a/lib/System/system_error.cpp b/lib/Support/system_error.cpp
similarity index 95%
rename from lib/System/system_error.cpp
rename to lib/Support/system_error.cpp
index e7de852..cd18906 100644
--- a/lib/System/system_error.cpp
+++ b/lib/Support/system_error.cpp
@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/System/system_error.h"
-#include "llvm/System/Errno.h"
+#include "llvm/Support/system_error.h"
+#include "llvm/Support/Errno.h"
 #include <string>
 #include <cstring>
 
@@ -117,5 +117,5 @@
 #include "Unix/system_error.inc"
 #endif
 #if defined(LLVM_ON_WIN32)
-#include "Win32/system_error.inc"
+#include "Windows/system_error.inc"
 #endif
diff --git a/lib/System/CMakeLists.txt b/lib/System/CMakeLists.txt
deleted file mode 100644
index 16612ad..0000000
--- a/lib/System/CMakeLists.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-set(LLVM_REQUIRES_RTTI 1)
-if( MINGW )
-  set(LLVM_REQUIRES_EH 1)
-endif()
-
-add_llvm_library(LLVMSystem
-  Alarm.cpp
-  Atomic.cpp
-  Disassembler.cpp
-  DynamicLibrary.cpp
-  Errno.cpp
-  Host.cpp
-  IncludeFile.cpp
-  Memory.cpp
-  Mutex.cpp
-  Path.cpp
-  Process.cpp
-  Program.cpp
-  RWMutex.cpp
-  SearchForAddressOfSpecialSymbol.cpp
-  Signals.cpp
-  system_error.cpp
-  ThreadLocal.cpp
-  Threading.cpp
-  TimeValue.cpp
-  Valgrind.cpp
-  Unix/Alarm.inc
-  Unix/Host.inc
-  Unix/Memory.inc
-  Unix/Mutex.inc
-  Unix/Path.inc
-  Unix/Process.inc
-  Unix/Program.inc
-  Unix/RWMutex.inc
-  Unix/Signals.inc
-  Unix/system_error.inc
-  Unix/ThreadLocal.inc
-  Unix/TimeValue.inc
-  Win32/Alarm.inc
-  Win32/DynamicLibrary.inc
-  Win32/Host.inc
-  Win32/Memory.inc
-  Win32/Mutex.inc
-  Win32/Path.inc
-  Win32/Process.inc
-  Win32/Program.inc
-  Win32/RWMutex.inc
-  Win32/Signals.inc
-  Win32/system_error.inc
-  Win32/ThreadLocal.inc
-  Win32/TimeValue.inc
-  )
diff --git a/lib/System/Makefile b/lib/System/Makefile
deleted file mode 100644
index 5d4fda9..0000000
--- a/lib/System/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-##===- lib/System/Makefile ---------------------------------*- Makefile -*-===##
-#
-#                     The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-LEVEL = ../..
-LIBRARYNAME = LLVMSystem
-BUILD_ARCHIVE = 1
-REQUIRES_RTTI = 1
-
-EXTRA_DIST = Unix Win32 README.txt
-
-include $(LEVEL)/Makefile.common
-
-CompileCommonOpts := $(filter-out -pedantic,$(CompileCommonOpts))
-CompileCommonOpts := $(filter-out -Wno-long-long,$(CompileCommonOpts))
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 6289f42..c628df0 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -25,7 +25,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/ADT/DenseMap.h"
 #include <algorithm>
 #include <cstdlib>
diff --git a/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h b/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
index abcb716..1425b86 100644
--- a/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
+++ b/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
@@ -22,7 +22,7 @@
 #ifndef X86DISASSEMBLERDECODERCOMMON_H
 #define X86DISASSEMBLERDECODERCOMMON_H
 
-#include "llvm/System/DataTypes.h"
+#include "llvm/Support/DataTypes.h"
 
 #define INSTRUCTIONS_SYM  x86DisassemblerInstrSpecifiers
 #define CONTEXTS_SYM      x86DisassemblerContexts
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index e83f359..759de77 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -19,7 +19,7 @@
 #include "llvm/Function.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/System/Valgrind.h"
+#include "llvm/Support/Valgrind.h"
 #include <cstdlib>
 #include <cstring>
 using namespace llvm;
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index 0d02e5e..3ad84b9 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -18,7 +18,7 @@
 #include "llvm/GlobalValue.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Host.h"
+#include "llvm/Support/Host.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/ADT/SmallVector.h"
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index e4a228b..92152a3 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -15,8 +15,8 @@
 #include "llvm/Type.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/FoldingSet.h"
-#include "llvm/System/Atomic.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Atomic.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/raw_ostream.h"
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 8f94efc..22f0096 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -20,8 +20,8 @@
 #include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/StringPool.h"
-#include "llvm/System/RWMutex.h"
-#include "llvm/System/Threading.h"
+#include "llvm/Support/RWMutex.h"
+#include "llvm/Support/Threading.h"
 #include "SymbolTableListTraitsImpl.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/StringExtras.h"
diff --git a/lib/VMCore/LeakDetector.cpp b/lib/VMCore/LeakDetector.cpp
index a44f61d..f6651e9 100644
--- a/lib/VMCore/LeakDetector.cpp
+++ b/lib/VMCore/LeakDetector.cpp
@@ -16,8 +16,8 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/ManagedStatic.h"
-#include "llvm/System/Mutex.h"
-#include "llvm/System/Threading.h"
+#include "llvm/Support/Mutex.h"
+#include "llvm/Support/Threading.h"
 #include "llvm/Value.h"
 using namespace llvm;
 
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp
index 88aaa5e..d798d6b 100644
--- a/lib/VMCore/PassManager.cpp
+++ b/lib/VMCore/PassManager.cpp
@@ -24,7 +24,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PassNameParser.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include <algorithm>
 #include <cstdio>
 #include <map>
diff --git a/lib/VMCore/PassRegistry.cpp b/lib/VMCore/PassRegistry.cpp
index 1fc26b0..af11898 100644
--- a/lib/VMCore/PassRegistry.cpp
+++ b/lib/VMCore/PassRegistry.cpp
@@ -16,7 +16,7 @@
 #include "llvm/PassSupport.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/ManagedStatic.h"
-#include "llvm/System/Mutex.h"
+#include "llvm/Support/Mutex.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/StringMap.h"
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index ba50e07..395ca56 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -27,7 +27,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/System/Threading.h"
+#include "llvm/Support/Threading.h"
 #include <algorithm>
 #include <cstdarg>
 using namespace llvm;