Commit 44c158e
Automerge: [lldb][NFC] Move SBThread::ResumeNewPlan out of the header (#151988)
This *private* method is only defined as a member class of SBThread so
that it may be declared a `friend` of SBError and access a private
constructor of SBError that takes a `Status`, which is an `lldb_private`
object. In other words, the method does not use anything about the class
is belongs to, so it has no business being a member method.
A subsequent patch will need to add a new argument to this class, a
`Process::StopLocker`, which is also another `lldb_private` object. This
is another strong suggestion that this method does not belong on the
header file of a public API, even if at the private visibility level. We
can't forward declare nested types like `Process:StopLocker`, so this
problem is not easily solvable.
This commit moves the method out of the header and into an anon
namespace of the cpp file. It is also made to return a Status instead,
and the private `SBError` constructor is accessed by the SBThread
methods that call it.2 files changed
+7
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 254 | | |
258 | 255 | | |
259 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
| 498 | + | |
502 | 499 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 500 | + | |
| 501 | + | |
507 | 502 | | |
508 | 503 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 504 | + | |
| 505 | + | |
513 | 506 | | |
514 | 507 | | |
515 | 508 | | |
| |||
522 | 515 | | |
523 | 516 | | |
524 | 517 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
| 518 | + | |
| 519 | + | |
530 | 520 | | |
531 | 521 | | |
532 | 522 | | |
| |||
0 commit comments