Skip to content


No way to create constants of named structure type #22

whitequark opened this Issue · 0 comments

1 participant

ruby-llvm member

LLVM features disjoint named and unnamed type "name"spaces: { i32 } and %foo = type { i32 } are distinct and incompatible types. Further, the values of these types (as opposed to pointers to these values) cannot be bitcast one to another.

Currently, there is no way to create the following LLVM IR with ruby-llvm:

%foo = type { i32 }
@FOO = global %foo { i32 1 }

as the LLVM::ConstantStruct.const constructor implicitly creates an unnamed aggregate type derived from the types of its arguments.

@whitequark whitequark closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.