summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Compilation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/Compilation.cpp')
-rw-r--r--clang/lib/Driver/Compilation.cpp6
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) {
OpenPOWER on IntegriCloud