aboutsummaryrefslogtreecommitdiff
path: root/clang/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
commitf0eddb8510353f381193c48899199230303da4a2 (patch)
tree04a01f7abccc2ab40080957fab503a28bb0d1ad0 /clang/lib/Driver/Action.cpp
parent8df898917f9491cbb53b79f36ca6a9af27ff62b3 (diff)
downloadllvm-f0eddb8510353f381193c48899199230303da4a2.zip
llvm-f0eddb8510353f381193c48899199230303da4a2.tar.gz
llvm-f0eddb8510353f381193c48899199230303da4a2.tar.bz2
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. llvm-svn: 67158
Diffstat (limited to 'clang/lib/Driver/Action.cpp')
-rw-r--r--clang/lib/Driver/Action.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp
index aafb589..71bf22f 100644
--- a/clang/lib/Driver/Action.cpp
+++ b/clang/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) {