Commit 2f58b9a
authored
[lldb] Unify CalculateMD5 return types (#90921)
# Overview
In my previous PR: #88812,
@JDevlieghere suggested to match return types of the various calculate
md5 functions.
This PR achieves that by changing the various calculate md5 functions to
return `llvm::ErrorOr<llvm::MD5::MD5Result>`.
The suggestion was to go for `std::optional<>` but I opted for
`llvm::ErrorOr<>` because local calculate md5 was already possibly
returning `ErrorOr`.
To make sure I didn't break the md5 calculation functionality, I ran
some tests for the gdb remote client, and things seem to work.
# Testing
1. Remote file doesn't exist

1. Remote file differs

1. Remote file matches

## Test gaps
Unfortunately, I had to modify
`lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.cpp` and I
can't test the changes there. Hopefully, the existing test suite / code
review from whomever is reading this will catch any issues.
Co-authored-by: Anthony Ha <[email protected]>1 parent f8a9973 commit 2f58b9a
File tree
9 files changed
+60
-52
lines changed- lldb
- include/lldb/Target
- source
- Plugins
- Platform
- MacOSX
- gdb-server
- Process/gdb-remote
- Target
9 files changed
+60
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | | - | |
653 | | - | |
| 652 | + | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | 408 | | |
410 | 409 | | |
411 | 410 | | |
412 | | - | |
413 | 411 | | |
414 | | - | |
415 | | - | |
416 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
417 | 422 | | |
418 | | - | |
419 | 423 | | |
420 | 424 | | |
421 | 425 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
687 | | - | |
688 | | - | |
| 687 | + | |
| 688 | + | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
691 | 691 | | |
692 | | - | |
| 692 | + | |
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
Lines changed: 19 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3418 | 3418 | | |
3419 | 3419 | | |
3420 | 3420 | | |
3421 | | - | |
3422 | | - | |
| 3421 | + | |
| 3422 | + | |
3423 | 3423 | | |
3424 | 3424 | | |
3425 | 3425 | | |
| |||
3428 | 3428 | | |
3429 | 3429 | | |
3430 | 3430 | | |
3431 | | - | |
| 3431 | + | |
3432 | 3432 | | |
3433 | | - | |
| 3433 | + | |
3434 | 3434 | | |
3435 | | - | |
| 3435 | + | |
3436 | 3436 | | |
3437 | 3437 | | |
3438 | 3438 | | |
| |||
3455 | 3455 | | |
3456 | 3456 | | |
3457 | 3457 | | |
3458 | | - | |
| 3458 | + | |
3459 | 3459 | | |
3460 | 3460 | | |
| 3461 | + | |
3461 | 3462 | | |
3462 | | - | |
| 3463 | + | |
3463 | 3464 | | |
3464 | 3465 | | |
3465 | 3466 | | |
3466 | 3467 | | |
3467 | 3468 | | |
3468 | | - | |
| 3469 | + | |
3469 | 3470 | | |
3470 | 3471 | | |
| 3472 | + | |
3471 | 3473 | | |
3472 | | - | |
| 3474 | + | |
3473 | 3475 | | |
3474 | | - | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
3475 | 3483 | | |
3476 | | - | |
| 3484 | + | |
3477 | 3485 | | |
3478 | 3486 | | |
3479 | 3487 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1206 | 1206 | | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1210 | 1212 | | |
1211 | | - | |
1212 | 1213 | | |
1213 | | - | |
| 1214 | + | |
1214 | 1215 | | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
| 1216 | + | |
| 1217 | + | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| |||
1339 | 1339 | | |
1340 | 1340 | | |
1341 | 1341 | | |
1342 | | - | |
1343 | | - | |
| 1342 | + | |
| 1343 | + | |
1344 | 1344 | | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
| 1345 | + | |
| 1346 | + | |
1351 | 1347 | | |
1352 | 1348 | | |
1353 | 1349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
| 269 | + | |
| 270 | + | |
271 | 271 | | |
272 | | - | |
273 | | - | |
| 272 | + | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
0 commit comments