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 | 21549237f14505cfc2a18a06416372a36229d0ce (patch) | |
tree | fd80d6fde79c9948f5612ebb7d52161356a1475f /lib/Driver/Compilation.cpp | |
parent | 510d73200ec48496a2b10703385fe99b51e31fa5 (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/Compilation.cpp')
-rw-r--r-- | lib/Driver/Compilation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp index 949bbe7d6b..b35bf2402d 100644 --- a/lib/Driver/Compilation.cpp +++ b/lib/Driver/Compilation.cpp @@ -9,6 +9,7 @@ #include "clang/Driver/Compilation.h" +#include "clang/Driver/Action.h" #include "clang/Driver/ArgList.h" #include "clang/Driver/ToolChain.h" @@ -29,6 +30,11 @@ Compilation::~Compilation() { if (A != Args) delete Args; } + + // Free the actions, if built. + for (ActionList::iterator it = Actions.begin(), ie = Actions.end(); + it != ie; ++it) + delete *it; } const ArgList &Compilation::getArgsForToolChain(const ToolChain *TC) { |