Commit 9b0e9ed
[globalopt] Change so that emitting fragments doesn't use the type size of DIVariables
When turning on -debug-info-kind=constructor we ran into a "fragment covers
entire variable" error during thinlto. The fragment is currently always
emitted if there is no type size, but sometimes the variable has a
forward declared struct type which doesn't have a size.
This changes the code to get the type size from the GlobalVariable instead.
Differential Revision: https://reviews.llvm.org/D85572
(cherry picked from commit 54b6cca)1 parent 33c13cd commit 9b0e9ed
File tree
2 files changed
+69
-8
lines changed- llvm
- lib/Transforms/IPO
- test/DebugInfo/Generic
2 files changed
+69
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
| 472 | + | |
472 | 473 | | |
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
476 | | - | |
477 | | - | |
478 | 477 | | |
479 | 478 | | |
480 | 479 | | |
481 | | - | |
482 | | - | |
483 | | - | |
| 480 | + | |
484 | 481 | | |
485 | 482 | | |
486 | 483 | | |
| |||
505 | 502 | | |
506 | 503 | | |
507 | 504 | | |
| 505 | + | |
508 | 506 | | |
509 | 507 | | |
510 | 508 | | |
| |||
560 | 558 | | |
561 | 559 | | |
562 | 560 | | |
563 | | - | |
| 561 | + | |
564 | 562 | | |
565 | 563 | | |
566 | 564 | | |
| |||
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
576 | | - | |
| 574 | + | |
577 | 575 | | |
578 | 576 | | |
579 | 577 | | |
| |||
Lines changed: 63 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments