Driver: Prep for tool chain specific argument translation.
 - Lift ArgList to a base class for InputArgList and DerivedArgList.
 
 - This is not a great decomposition, but it does embed the
   translation into the type system, and keep things efficient for
   tool chains that don't want to do any translation.

 - No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).

llvm-svn: 67676
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index c8df6c0..898f12e 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -9,6 +9,8 @@
 
 #include "ToolChains.h"
 
+#include "clang/Driver/Arg.h"
+#include "clang/Driver/ArgList.h"
 #include "clang/Driver/Driver.h"
 #include "clang/Driver/HostInfo.h"
 
@@ -122,9 +124,9 @@
   return *T;
 }
 
-ArgList *Darwin_X86::TranslateArgs(ArgList &Args) const { 
+DerivedArgList *Darwin_X86::TranslateArgs(InputArgList &Args) const { 
   // FIXME: Implement!
-  return &Args;
+  return new DerivedArgList(Args, true);
 } 
 
 bool Darwin_X86::IsMathErrnoDefault() const { 
@@ -223,3 +225,7 @@
 const char *Generic_GCC::GetForcedPicModel() const {
   return 0;
 }
+
+DerivedArgList *Generic_GCC::TranslateArgs(InputArgList &Args) const {
+  return new DerivedArgList(Args, true);
+}