mirror of
https://github.com/ziglang/zig.git
synced 2026-02-01 12:13:44 +00:00
use llvm named structs for const values when possible
normally we want to use llvm types for constants. but union constants (which are found inside enums) when they are initialized with the non-most-aligned-member must be unnamed structs. these bubble up to all aggregate types. if a constant of an aggregate type contains, recursively, a union constant with a non-most-aligned-member initialized, the aggregate typed constant must be unnamed too. this fixes all the asserts that were coming in from llvm master branch.
This commit is contained in:
parent
94ec2190f8
commit
9a99bd3a71
@ -183,6 +183,7 @@ static const ZigLLVM_EnvironmentType environ_list[] = {
|
||||
ZigLLVM_AMDOpenCL,
|
||||
ZigLLVM_CoreCLR,
|
||||
ZigLLVM_OpenCL,
|
||||
ZigLLVM_Simulator,
|
||||
};
|
||||
|
||||
static const ZigLLVM_ObjectFormatType oformat_list[] = {
|
||||
|
||||
@ -339,8 +339,9 @@ enum ZigLLVM_EnvironmentType {
|
||||
ZigLLVM_AMDOpenCL,
|
||||
ZigLLVM_CoreCLR,
|
||||
ZigLLVM_OpenCL,
|
||||
ZigLLVM_Simulator, // Simulator variants of other systems, e.g., Apple's iOS
|
||||
|
||||
ZigLLVM_LastEnvironmentType = ZigLLVM_OpenCL
|
||||
ZigLLVM_LastEnvironmentType = ZigLLVM_Simulator
|
||||
};
|
||||
|
||||
enum ZigLLVM_ObjectFormatType {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user