aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Action.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-18 02:55:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-18 02:55:38 +0000
commit21549237f14505cfc2a18a06416372a36229d0ce (patch)
treefd80d6fde79c9948f5612ebb7d52161356a1475f /lib/Driver/Action.cpp
parent510d73200ec48496a2b10703385fe99b51e31fa5 (diff)
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
Diffstat (limited to 'lib/Driver/Action.cpp')
-rw-r--r--lib/Driver/Action.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp
index aafb589f42..71bf22ffa1 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) {