diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-18 02:55:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-18 02:55:38 +0000 |
commit | f0eddb8510353f381193c48899199230303da4a2 (patch) | |
tree | 04a01f7abccc2ab40080957fab503a28bb0d1ad0 /clang/lib/Driver/Action.cpp | |
parent | 8df898917f9491cbb53b79f36ca6a9af27ff62b3 (diff) | |
download | llvm-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.cpp | 6 |
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) { |