Driver: Move actions into Compilation, and construct the compilation
earlier.

 - This gives us a simple ownership model, and allows clients access
   to more information should they ever want it.

 - We now free Actions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67158 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp
index aafb589..71bf22f 100644
--- a/lib/Driver/Action.cpp
+++ b/lib/Driver/Action.cpp
@@ -12,7 +12,11 @@
 #include <cassert>
 using namespace clang::driver;
 
-Action::~Action() {}
+Action::~Action() {
+  // Free the inputs.
+  for (iterator it = begin(), ie = end(); it != ie; ++it)
+    delete *it;  
+}
 
 const char *Action::getClassName(ActionClass AC) {
   switch (AC) {