Commit 4f99111
authored
[CIR] ConstRecordBuilder check if attribute present before casting (llvm#164575)
Fix the crash because in `ConstRecordBuilder::build` we cast to
TypedAttr then we check if it null, but in case that the result from
emitter is nullptr, that cast crash, In this PR I fixed the order to
check first if it not null, then casting to the TypedAttr1 parent f567367 commit 4f99111
File tree
2 files changed
+24
-13
lines changed- clang
- lib/CIR/CodeGen
- test/CIR/CodeGen
2 files changed
+24
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
| 630 | + | |
634 | 631 | | |
635 | 632 | | |
636 | 633 | | |
| |||
686 | 683 | | |
687 | 684 | | |
688 | 685 | | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
698 | 691 | | |
699 | 692 | | |
| 693 | + | |
700 | 694 | | |
701 | 695 | | |
702 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
43 | 60 | | |
44 | 61 | | |
45 | 62 | | |
| |||
0 commit comments