Commit b18ea86
committed
[lldb][windows] use Windows APIs to print to the console (llvm#156469)
This is a relanding of llvm#149493.
The tests were failing because we were interpreting a proper file
descriptor as a console file descriptor.
This patch uses the Windows APIs to print to the Windows Console,
through `llvm::raw_fd_ostream`.
This fixes a rendering issue where the characters defined in
`DiagnosticsRendering.cpp` ("╰" for instance) are not rendered properly
on Windows out of the box, because the default codepage is not `utf-8`.
This solution is based on [this patch
downstream](https://github.com/swiftlang/swift/pull/40632/files#diff-e948e4bd7a601e3ca82d596058ccb39326459a4751470eec4d393adeaf516977R37-R38).
rdar://156064500
(cherry picked from commit f444576)1 parent 63d6287 commit b18ea86
2 files changed
+41
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
| 387 | + | |
390 | 388 | | |
391 | | - | |
392 | | - | |
393 | | - | |
| 389 | + | |
394 | 390 | | |
395 | 391 | | |
396 | 392 | | |
| |||
444 | 440 | | |
445 | 441 | | |
446 | 442 | | |
447 | | - | |
| 443 | + | |
448 | 444 | | |
449 | 445 | | |
450 | 446 | | |
451 | | - | |
| 447 | + | |
452 | 448 | | |
453 | 449 | | |
454 | 450 | | |
455 | 451 | | |
456 | 452 | | |
457 | 453 | | |
| 454 | + | |
| 455 | + | |
458 | 456 | | |
459 | 457 | | |
460 | 458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
250 | 277 | | |
251 | 278 | | |
252 | 279 | | |
| |||
629 | 656 | | |
630 | 657 | | |
631 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
632 | 666 | | |
633 | 667 | | |
634 | 668 | | |
| |||
0 commit comments