HomePhabricator

[lldb][NFC] Don't inherit from UserID in ValueObject

Authored by teemperor on Feb 23 2021, 1:14 AM.

Description

[lldb][NFC] Don't inherit from UserID in ValueObject

ValueObject inherits from UserID which is just a bad idea:

  • The inheritance gives ValueObject some member functions that are at best misleading (such as Clear() which doesn't clear any value beside id).
  • It allows passing ValueObject to the overloaded operators for UserID (such as == or << which won't actually compare or print anything in the ValueObject).
  • It exposes the SetID and Clear which both allow users to change the internal id value.

Similar to D91699 which did the same for Process

Reviewed By: #lldb, JDevlieghere

Differential Revision: https://reviews.llvm.org/D97205

Details

Committed
teemperorFeb 23 2021, 1:15 AM
Reviewer
Restricted Project
Differential Revision
D97205: [lldb][NFC] Don't inherit from UserID in ValueObject
Parents
rGf8b9035aae44: [X86] Support amx-int8 intrinsic.
Branches
Unknown
Tags
Unknown