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/Compilation.cpp | |
parent | 8df898917f9491cbb53b79f36ca6a9af27ff62b3 (diff) | |
download | bcm5719-llvm-f0eddb8510353f381193c48899199230303da4a2.tar.gz bcm5719-llvm-f0eddb8510353f381193c48899199230303da4a2.zip |
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/Compilation.cpp')
-rw-r--r-- | clang/lib/Driver/Compilation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp index 949bbe7d6b9..b35bf2402db 100644 --- a/clang/lib/Driver/Compilation.cpp +++ b/clang/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) { |