Skip to content
Commit 17e2633c authored by David Majnemer's avatar David Majnemer
Browse files

CodeGen: Compound literals with funny types shouldn't crash

CodeGen assumed that a compound literal with array type should have a
corresponding LLVM IR array type.

We had two bugs in this area:
- Zero sized arrays in compound literals would lead to the creation of
  an opaque type.  This is unnecessary, we should just create an array
  type with a bound of zero.
- Funny record types (like unions) lead to exotic IR types for compound
  literals.  In this case, CodeGen must be prepared to deal with the
  possibility that it might not have an array IR type.

This fixes PR21912.

llvm-svn: 224219
parent 3fcafa2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment