Commit 4240a25
Andres Madrid Ucha
Clang: Fix elementtype attribute mismatch in thunk generation
Previously, CurrentThisTy was assigned from FnInfo, which could contain
type information that was not updated. This caused a type mismatch between
the function's parameter type and the elementtype attribute, specially
in multiple-inheritance cases.
Now we extract CurrentThisTy directly from the actual thunk function parameter,
so that they are both consistent. We need to make sure that the thunk function
has arguments, otherwise there can be issues accessing their type.
Only typed pointers can be handled this way because for opaque pointers,
the getPointerElementType() is depricated. Therefore, they get handled in the
previous way in which we assigned CurrentThisTy1 parent 8907c03 commit 4240a25
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
580 | 597 | | |
581 | 598 | | |
582 | 599 | | |
| |||
0 commit comments