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
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
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
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
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
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