This is an archive of the discontinued LLVM Phabricator instance.

Clean up NativeRegisterContext
ClosedPublic

Authored by labath on Nov 9 2017, 5:09 AM.

Details

Summary

This commit removes the concrete_frame_idx member from
NativeRegisterContext and related functions, which was always set to
zero and never used.

I also change the native thread class to store a NativeRegisterContext
as a unique_ptr (documenting the ownership) and make sure it is always
initialized (most of the code was already blindly dereferencing the
register context pointer, assuming it would always be present -- this
makes its treatment consistent).

(I've checked that x86-linux, arm-linux, mips-linux, and x86-netbsd
build after this, the PPC and SystemZ changes are eyeballed.)

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Nov 9 2017, 5:09 AM
clayborg accepted this revision.Nov 9 2017, 9:28 AM
This revision is now accepted and ready to land.Nov 9 2017, 9:28 AM
krytarowski edited edge metadata.Nov 9 2017, 9:38 AM

The NetBSD part looks fine.

This revision was automatically updated to reflect the committed changes.