Move <root>/Driver into <root>/tools/clang-cc.

Again, I tried to update cmake but it is untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67605 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9100bf..2eaedf5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,6 @@
 
 add_subdirectory(include)
 add_subdirectory(lib)
-add_subdirectory(Driver)
 add_subdirectory(tools)
 
 # TODO: docs.
diff --git a/Driver/Makefile b/Driver/Makefile
deleted file mode 100644
index 188df25..0000000
--- a/Driver/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-LEVEL = ../../..
-TOOLNAME = clang-cc
-CPPFLAGS += -I$(PROJ_SRC_DIR)/../include -I$(PROJ_OBJ_DIR)/../include
-CXXFLAGS = -fno-rtti
-
-# Clang has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
-
-# Include this here so we can get the configuration of the targets
-# that have been configured for construction. We have to do this 
-# early so we can set up LINK_COMPONENTS before including Makefile.rules
-include $(LEVEL)/Makefile.config
-
-LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader bitwriter codegen ipo selectiondag
-USEDLIBS = clangCodeGen.a clangAnalysis.a clangRewrite.a clangSema.a	\
-           clangFrontend.a clangAST.a clangParse.a clangLex.a		\
-           clangBasic.a 
-
-include $(LLVM_SRC_ROOT)/Makefile.rules
diff --git a/Makefile b/Makefile
index b4f60a8..00e38d2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 LEVEL = ../..
-DIRS := include lib Driver docs tools
+DIRS := include lib tools docs
 
 include $(LEVEL)/Makefile.common
 
@@ -24,7 +24,7 @@
 	$(Verb) etags `find . -type f -name \*.h | grep -v /lib/Headers | grep -v /test/` `find . -type f -name \*.cpp | grep -v /lib/Headers | grep -v /test/`
 
 cscope.files:
-	find Driver lib include -name '*.cpp' \
+	find tools lib include -name '*.cpp' \
 	                    -or -name '*.def' \
 	                    -or -name '*.td' \
 	                    -or -name '*.h' > cscope.files
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index e5dc2cc..6c66dea 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1 +1,2 @@
+add_subdirectory(clang-cc)
 add_subdirectory(driver)
diff --git a/tools/Makefile b/tools/Makefile
index 25a43cd..e8205d3 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL := ../../..
-DIRS := ccc driver
+DIRS := clang-cc ccc driver
 
 include $(LEVEL)/Makefile.common
diff --git a/Driver/ASTConsumers.cpp b/tools/clang-cc/ASTConsumers.cpp
similarity index 100%
rename from Driver/ASTConsumers.cpp
rename to tools/clang-cc/ASTConsumers.cpp
diff --git a/Driver/ASTConsumers.h b/tools/clang-cc/ASTConsumers.h
similarity index 100%
rename from Driver/ASTConsumers.h
rename to tools/clang-cc/ASTConsumers.h
diff --git a/Driver/Analyses.def b/tools/clang-cc/Analyses.def
similarity index 100%
rename from Driver/Analyses.def
rename to tools/clang-cc/Analyses.def
diff --git a/Driver/AnalysisConsumer.cpp b/tools/clang-cc/AnalysisConsumer.cpp
similarity index 100%
rename from Driver/AnalysisConsumer.cpp
rename to tools/clang-cc/AnalysisConsumer.cpp
diff --git a/Driver/Backend.cpp b/tools/clang-cc/Backend.cpp
similarity index 100%
rename from Driver/Backend.cpp
rename to tools/clang-cc/Backend.cpp
diff --git a/Driver/CMakeLists.txt b/tools/clang-cc/CMakeLists.txt
similarity index 94%
rename from Driver/CMakeLists.txt
rename to tools/clang-cc/CMakeLists.txt
index 02e6a4d..9dd596c 100644
--- a/Driver/CMakeLists.txt
+++ b/tools/clang-cc/CMakeLists.txt
@@ -21,7 +21,7 @@
   selectiondag
   )
 
-add_clang_executable(clang
+add_clang_executable(clang-cc
   AnalysisConsumer.cpp
   ASTConsumers.cpp
   Backend.cpp
diff --git a/Driver/CacheTokens.cpp b/tools/clang-cc/CacheTokens.cpp
similarity index 100%
rename from Driver/CacheTokens.cpp
rename to tools/clang-cc/CacheTokens.cpp
diff --git a/Driver/DependencyFile.cpp b/tools/clang-cc/DependencyFile.cpp
similarity index 100%
rename from Driver/DependencyFile.cpp
rename to tools/clang-cc/DependencyFile.cpp
diff --git a/Driver/DiagChecker.cpp b/tools/clang-cc/DiagChecker.cpp
similarity index 100%
rename from Driver/DiagChecker.cpp
rename to tools/clang-cc/DiagChecker.cpp
diff --git a/Driver/HTMLPrint.cpp b/tools/clang-cc/HTMLPrint.cpp
similarity index 100%
rename from Driver/HTMLPrint.cpp
rename to tools/clang-cc/HTMLPrint.cpp
diff --git a/tools/clang-cc/Makefile b/tools/clang-cc/Makefile
new file mode 100644
index 0000000..4539665
--- /dev/null
+++ b/tools/clang-cc/Makefile
@@ -0,0 +1,28 @@
+##===- tools/clang-cc/Makefile -----------------------------*- Makefile -*-===##
+# 
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+# 
+##===----------------------------------------------------------------------===##
+LEVEL = ../../../..
+
+TOOLNAME = clang-cc
+CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
+CXXFLAGS = -fno-rtti
+
+# Clang has no plugins, optimize startup time.
+TOOL_NO_EXPORTS = 1
+
+# Include this here so we can get the configuration of the targets
+# that have been configured for construction. We have to do this 
+# early so we can set up LINK_COMPONENTS before including Makefile.rules
+include $(LEVEL)/Makefile.config
+
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader bitwriter codegen ipo selectiondag
+USEDLIBS = clangCodeGen.a clangAnalysis.a clangRewrite.a clangSema.a	\
+           clangFrontend.a clangAST.a clangParse.a clangLex.a		\
+           clangBasic.a 
+
+include $(LLVM_SRC_ROOT)/Makefile.rules
diff --git a/Driver/PrintParserCallbacks.cpp b/tools/clang-cc/PrintParserCallbacks.cpp
similarity index 100%
rename from Driver/PrintParserCallbacks.cpp
rename to tools/clang-cc/PrintParserCallbacks.cpp
diff --git a/Driver/PrintPreprocessedOutput.cpp b/tools/clang-cc/PrintPreprocessedOutput.cpp
similarity index 100%
rename from Driver/PrintPreprocessedOutput.cpp
rename to tools/clang-cc/PrintPreprocessedOutput.cpp
diff --git a/Driver/RewriteBlocks.cpp b/tools/clang-cc/RewriteBlocks.cpp
similarity index 100%
rename from Driver/RewriteBlocks.cpp
rename to tools/clang-cc/RewriteBlocks.cpp
diff --git a/Driver/RewriteMacros.cpp b/tools/clang-cc/RewriteMacros.cpp
similarity index 100%
rename from Driver/RewriteMacros.cpp
rename to tools/clang-cc/RewriteMacros.cpp
diff --git a/Driver/RewriteObjC.cpp b/tools/clang-cc/RewriteObjC.cpp
similarity index 100%
rename from Driver/RewriteObjC.cpp
rename to tools/clang-cc/RewriteObjC.cpp
diff --git a/Driver/RewriteTest.cpp b/tools/clang-cc/RewriteTest.cpp
similarity index 100%
rename from Driver/RewriteTest.cpp
rename to tools/clang-cc/RewriteTest.cpp
diff --git a/Driver/SerializationTest.cpp b/tools/clang-cc/SerializationTest.cpp
similarity index 100%
rename from Driver/SerializationTest.cpp
rename to tools/clang-cc/SerializationTest.cpp
diff --git a/Driver/Warnings.cpp b/tools/clang-cc/Warnings.cpp
similarity index 100%
rename from Driver/Warnings.cpp
rename to tools/clang-cc/Warnings.cpp
diff --git a/Driver/clang.cpp b/tools/clang-cc/clang.cpp
similarity index 100%
rename from Driver/clang.cpp
rename to tools/clang-cc/clang.cpp
diff --git a/Driver/clang.h b/tools/clang-cc/clang.h
similarity index 100%
rename from Driver/clang.h
rename to tools/clang-cc/clang.h
diff --git a/tools/driver/Makefile b/tools/driver/Makefile
index 9ad719f..8910001 100644
--- a/tools/driver/Makefile
+++ b/tools/driver/Makefile
@@ -12,12 +12,12 @@
 CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
 CXXFLAGS = -fno-rtti
 
+# This tool has no plugins, optimize startup time.
+TOOL_NO_EXPORTS = 1
+
 # FIXME: It is unfortunate we need to pull in the bitcode reader and
 # writer just to get the serializer stuff used by clangBasic.
 LINK_COMPONENTS := system support bitreader bitwriter
 USEDLIBS = clangDriver.a clangBasic.a
 
-# This tool has no plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
-
 include $(LEVEL)/Makefile.common