Commit 10c91ff
[lldb][NFC] Move SBThread::ResumeNewPlan out of the header (llvm#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.
(cherry picked from commit 849daa4)1 parent 5e593a2 commit 10c91ff
2 files changed
+7
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 258 | | |
262 | 259 | | |
263 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 517 | + | |
521 | 518 | | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
| 519 | + | |
| 520 | + | |
526 | 521 | | |
527 | 522 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 523 | + | |
| 524 | + | |
532 | 525 | | |
533 | 526 | | |
534 | 527 | | |
| |||
541 | 534 | | |
542 | 535 | | |
543 | 536 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
| 537 | + | |
| 538 | + | |
549 | 539 | | |
550 | 540 | | |
551 | 541 | | |
| |||
0 commit comments