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

[Feature] There seems to be no bindings for "ConstantArray" #17

Closed
wavpro opened this issue Jun 4, 2022 · 6 comments
Closed

[Feature] There seems to be no bindings for "ConstantArray" #17

wavpro opened this issue Jun 4, 2022 · 6 comments

Comments

@wavpro
Copy link

wavpro commented Jun 4, 2022

Which LLVM APIs do you want llvm-bindings to provide
There seems to be no bindings for "ConstantArray", which is quite an important datatype since it's needed for most string implementations. Could it be added to the bindings or is there some issue preventing that?

@ApsarasX
Copy link
Owner

ApsarasX commented Jun 5, 2022

OK, I will add class ConstantArray as soon as possible.

@wavpro
Copy link
Author

wavpro commented Jun 5, 2022

Thank you so much!

@ApsarasX
Copy link
Owner

ApsarasX commented Jun 5, 2022

How are you going to use class ConstantArray?

I have added class ConstantArray in 3b609cb, but haven't pushed new version to npm yet.

In the commit, I just added two methods for class ConstantArray, which are:

public static get(type: ArrayType, values: Constant[]): Constant;

public getType(): ArrayType;

Do you need to use other methods of class ConstantArray?

@ApsarasX
Copy link
Owner

ApsarasX commented Jun 6, 2022

I have released v0.3.8 into npm.

For details, please see https://github.com/ApsarasX/llvm-bindings/releases/tag/v0.3.8

@ApsarasX
Copy link
Owner

@wavpro Do you still have questions about this issue?

@dvoytenko
Copy link
Contributor

@ApsarasX I think there might be a bug in

if (info.Length() < 2 || !StructType::IsClassOf(info[0]) || !info[1].IsArray()) {

Shouldn't it be ArrayType::IsClassOf? See #19.

@ApsarasX ApsarasX closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants