This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Fix: make m_target_arch private
ClosedPublic

Authored by Emmmer on Aug 22 2022, 1:31 AM.

Details

Summary

Using GetTargetArchitecture() instead of m_target_arch, and set m_target_arch to private.

Diff Detail

Event Timeline

Emmmer created this revision.Aug 22 2022, 1:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2022, 1:31 AM
Emmmer published this revision for review.Aug 22 2022, 1:34 AM
Emmmer edited the summary of this revision. (Show Details)
Emmmer added reviewers: JDevlieghere, DavidSpickett.
Emmmer added a project: Restricted Project.
Emmmer added subscribers: imkiva, liaolucy.
DavidSpickett added inline comments.Aug 22 2022, 2:00 AM
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.cpp
227

Please also remove the commented out asserts that use m_target_arch.

At least for PowerPC they have been commented out since the first commit so it won't do any harm to remove them and they will now fail to compile anyway.

lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h
64

Rare footage of a fixme getting fixed :) Thanks!

Emmmer updated this revision to Diff 454426.Aug 22 2022, 2:22 AM

Address review comments

Emmmer marked an inline comment as done.Aug 22 2022, 2:23 AM
DavidSpickett accepted this revision.Aug 22 2022, 2:47 AM

I think there are a few more commented out asserts, check that a grep for m_target_arch in lldb/ doesn't turn up anything you wouldn't expect.

Otherwise LGTM. If you find any more just land it with them removed.

This revision is now accepted and ready to land.Aug 22 2022, 2:47 AM
This revision was automatically updated to reflect the committed changes.