Previously, it was easy to leave some Out<ELFT> fields uninitialized
because assignments to the fields are mixed with output section
instantiations. In this patch, I separate initializations from assignments
to improve readability.
Details
- Reviewers
- None
Diff Detail
Event Timeline
ELF/Writer.cpp | ||
---|---|---|
120 | Why do these need to be std::uinque_ptr? |
OK to commit?
ELF/Writer.cpp | ||
---|---|---|
120 | Because we want to release the object at end of this function. (Does this answer to your question?) |
This doesn't really seem to address the issue that concerned me that I brought up in the post-commit of r259444. The issue is that there is no single point of truth for resetting all the things inside Out.
I mean, the change seems like an okay cleanup, but it seems somewhat orthogonal to what I was saying.
Sean,
I applied your patch and experimented with that for a while, but I didn't like the repetation of OutTy and Out field initialization code. If we can use the template variable, it would be to fine, so I want to wait for the project to switch to C++14.
Why do these need to be std::uinque_ptr?