[PATCH] D54010: [CodeGen] Fix a crash when updating a zeroinitialize designated initializer

2018-11-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346004: [CodeGen] Fix a crash when updating a designated initializer (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D54010?vs=172306=172396#toc Repository: rC

[PATCH] D54010: [CodeGen] Fix a crash when updating a zeroinitialize designated initializer

2018-11-02 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D54010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54010: [CodeGen] Fix a crash when updating a zeroinitialize designated initializer

2018-11-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1142 + llvm_unreachable("Unexpected Base constant type!"); +} rjmccall wrote: > Is `getAggregateElement` not good enough here? No, `getAggregateElement` is

[PATCH] D54010: [CodeGen] Fix a crash when updating a zeroinitialize designated initializer

2018-11-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 172306. erik.pilkington marked an inline comment as done. erik.pilkington added a comment. Use `getAggregateElement`. Thanks! https://reviews.llvm.org/D54010 Files: clang/lib/CodeGen/CGExprConstant.cpp

[PATCH] D54010: [CodeGen] Fix a crash when updating a zeroinitialize designated initializer

2018-11-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1142 + llvm_unreachable("Unexpected Base constant type!"); +} Is `getAggregateElement` not good enough here? Repository: rC Clang https://reviews.llvm.org/D54010

[PATCH] D54010: [CodeGen] Fix a crash when updating a zeroinitialize designated initializer

2018-11-01 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, ahatanak. Herald added a subscriber: dexonsmith. LLVM IR, in it's infinite wisdom, doesn't relate `ConstantAggregate` and `ConstantAggregateZero` through inheritance, so make sure we handle both cases here. Fixes