exit(0) skips destructors, but we have LTO and dependencies on the stack which may have non trivial ones. E.g. closing files.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Can you clarify the motivation for this change - I don't see what is significantly different. The exit(0) for the index-only case is still in the same location and we just end up with a different data structure (Files) on the stack. AFAICT this just trades 2 vectors for a vector of tuples.
Comment Actions
exit(0) skips destructors, but we had LTO and dependencies objects on the stack. Some of them may have or add in the future non trivial destructors. E.g. closing files.
In D43415 I've added local std::unique_ptr<raw_fd_ostream> and it produced empty outputs, because stream was not closed correctly by destructor.
Comment Actions
LGTM
Thanks for the clarification - I focused on the wrong thing given the change to Filenames/IsTemporary.