Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LLVMExtDIBuilderCreateArrayType argument alignInBits should be UInt64 #11644

Conversation

lbguilherme
Copy link
Contributor

The LLVMExtDIBuilderCreateArrayType is defined as this on llvm_ext.cc:

LLVMMetadataRef LLVMExtDIBuilderCreateArrayType(
    DIBuilderRef Dref, uint64_t Size, uint64_t AlignInBits,
    LLVMMetadataRef Type, LLVMMetadataRef Subs) {
      return wrap(Dref->createArrayType(Size, AlignInBits, unwrapDI<DIType>(Type), DINodeArray(unwrapDI<MDTuple>(Subs))));
}

But is then imported as this:

  fun di_builder_create_array_type = LLVMExtDIBuilderCreateArrayType(builder : DIBuilder, size : UInt64,
                                                                     alignInBits : UInt32, ty : LibLLVM::MetadataRef,
                                                                     subscripts : LibLLVM::MetadataRef) : LibLLVM::MetadataRef

There is a mismatch in the type of the alignInBits argument.

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:llvm labels Dec 23, 2021
@straight-shoota straight-shoota modified the milestones: 1.4.0, 1.3.0 Dec 30, 2021
@straight-shoota straight-shoota merged commit 87f8bb4 into crystal-lang:master Jan 3, 2022
@straight-shoota straight-shoota changed the title fix: LLVMExtDIBuilderCreateArrayType: argument alignInBits should be UInt64 Fix LLVMExtDIBuilderCreateArrayType argument alignInBits should be UInt64 Jan 3, 2022
rdp pushed a commit to rdp/crystal that referenced this pull request Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:llvm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants