LLVM API: Fix compound literals with constant parameters to union fields

This commit is contained in:
gingerBill
2020-04-25 14:45:34 +01:00
parent 9409f53a9b
commit f63b9806d2
2 changed files with 13 additions and 9 deletions

View File

@@ -1742,7 +1742,7 @@ bool elem_type_can_be_constant(Type *t) {
if (t == t_invalid) {
return false;
}
if (is_type_any(t) || is_type_union(t)) {
if (is_type_any(t) || is_type_union(t) || is_type_raw_union(t)) {
return false;
}
return true;