Allow consts' LLVM types to depend on their initializers.
Loosening the connection between the LLVM type and the Rust type is necessary to use non-nullary enum constructors as const initializers, because the const needs to be initialized with data of the actual type of the variant in question, which is (generally) not the same as the u8 array in the `type_of` type. Thus, referring to a const now requires casting the LLVM global to the expected pointer type instead of using it as-is.
Showing
想要评论请 注册 或 登录