diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-11 23:07:27 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-11 23:07:27 +0000 |
commit | 41094615fb0684d0ceb74d4caba128ddc1b82c8c (patch) | |
tree | adf3d69388b935cec4899959bcd4d93548718131 /clang/lib/Driver/Compilation.cpp | |
parent | f55e41824729fd4675aeff75de96ce6be3e5867a (diff) | |
download | llvm-41094615fb0684d0ceb74d4caba128ddc1b82c8c.zip llvm-41094615fb0684d0ceb74d4caba128ddc1b82c8c.tar.gz llvm-41094615fb0684d0ceb74d4caba128ddc1b82c8c.tar.bz2 |
Move ownership of Action objects into Compilation.
Summary:
This makes constructing Action graphs which are DAGs much simpler. It
also just simplifies in general the ownership semantics of Actions.
Depends on D15910.
Reviewers: echristo
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D15911
llvm-svn: 257407
Diffstat (limited to 'clang/lib/Driver/Compilation.cpp')
-rw-r--r-- | clang/lib/Driver/Compilation.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp index e4af2a6..1c2eecd 100644 --- a/clang/lib/Driver/Compilation.cpp +++ b/clang/lib/Driver/Compilation.cpp @@ -40,11 +40,6 @@ Compilation::~Compilation() { if (it->second != TranslatedArgs) delete it->second; - // Free the actions, if built. - for (ActionList::iterator it = Actions.begin(), ie = Actions.end(); - it != ie; ++it) - delete *it; - // Free redirections of stdout/stderr. if (Redirects) { delete Redirects[1]; @@ -208,7 +203,8 @@ void Compilation::initCompilationForDiagnostics() { ForDiagnostics = true; // Free actions and jobs. - DeleteContainerPointers(Actions); + Actions.clear(); + AllActions.clear(); Jobs.clear(); // Clear temporary/results file lists. |