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

Global var or global array containing ptr to function #22

Open
artyomszasa opened this issue Oct 13, 2011 · 0 comments
Open

Global var or global array containing ptr to function #22

artyomszasa opened this issue Oct 13, 2011 · 0 comments

Comments

@artyomszasa
Copy link

In my program in need to create global variables and/or arrays containing pointers to internally linked functions.

As I see from documentation at http://hackage.haskell.org/packages/archive/llvm/0.9.1.2/doc/html/ when defining new global variable/array I need to provide value(s) of type 'ConstValue a', but 'Function a' (which I suppose represents pointer to the function itself) is defined as 'Value (Ptr a)', so it is a non-constant pointer.

Is there any solution for this problem? I think it is valid usecase, as it is possible to do so either when using other bindings to LLVM or when simply writing code in C!

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

1 participant