This is an archive of the discontinued LLVM Phabricator instance.

Remove shared_pointer from NativeThreadProtocol
ClosedPublic

Authored by labath on Jul 19 2017, 5:42 AM.

Details

Summary

The NativeThread class is useless without the containing process (and in
some places it is already assuming the process is always around). This
makes it clear that the NativeProcessProtocol is the object owning the
threads, and makes the destruction order deterministic (first threads,
then process). The NativeProcess is the only thing holding a thread
unique_ptr, and methods that used to hand out thread shared pointers now
return raw pointers or references.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Jul 19 2017, 5:42 AM
krytarowski edited edge metadata.Jul 19 2017, 6:40 AM

I don't have particular opinion. This change makes code cleaner.

This revision was automatically updated to reflect the committed changes.