For simple derived type ConstantEmitter returns a struct of the same size but different type which is then stored field-by-field into memory via pointer to derived type. In case base type has more fields than derived, the incorrect GEP is emitted. So, just cast pointer to derived type to appropriate type with enough fields. Fixes https://github.com/llvm/llvm-project/issues/60166 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D142534
84 KiB
84 KiB