[PATCH] D15911: Switch Action and ActionList over to using std::shared_ptr.
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 7 11:51:50 PST 2016
tra added a subscriber: tra.
================
Comment at: lib/Driver/Action.cpp:66
@@ -70,6 +65,3 @@
-CudaHostAction::~CudaHostAction() {
- for (auto &DA : DeviceActions)
- delete DA;
-}
+CudaHostAction::~CudaHostAction() {}
----------------
I guess we no longer need this destructor.
================
Comment at: lib/Driver/Driver.cpp:1053
@@ -1052,6 +1052,3 @@
for (unsigned i = 0, e = Archs.size(); i != e; ++i) {
- Inputs.push_back(
- new BindArchAction(std::unique_ptr<Action>(Act), Archs[i]));
- if (i != 0)
- Inputs.back()->setOwnsInputs(false);
+ Inputs.push_back(std::make_shared<BindArchAction>(Act, Archs[i]));
}
----------------
unneeded {}
http://reviews.llvm.org/D15911
More information about the cfe-commits
mailing list