LLVM IR, in it's infinite wisdom, doesn't relate ConstantAggregate and ConstantAggregateZero through inheritance, so make sure we handle both cases here. Fixes a crash-on-valid.
rdar://45691981
Thanks for taking a look!
Erik
Paths
| Differential D54010
[CodeGen] Fix a crash when updating a zeroinitialize designated initializer ClosedPublic Authored by erik.pilkington on Nov 1 2018, 4:32 PM.
Details Summary LLVM IR, in it's infinite wisdom, doesn't relate ConstantAggregate and ConstantAggregateZero through inheritance, so make sure we handle both cases here. Fixes a crash-on-valid. rdar://45691981 Thanks for taking a look!
Diff Detail
Event Timeline
erik.pilkington marked an inline comment as done. Comment ActionsUse getAggregateElement. Thanks!
This revision is now accepted and ready to land.Nov 2 2018, 8:39 AM Closed by commit rC346004: [CodeGen] Fix a crash when updating a designated initializer (authored by epilk). · Explain WhyNov 2 2018, 10:39 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 172396 lib/CodeGen/CGExprConstant.cpp
test/CodeGen/designated-initializers.c
|