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

Duplicate declarations #44

Open
ghost opened this issue Apr 24, 2013 · 1 comment
Open

Duplicate declarations #44

ghost opened this issue Apr 24, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 24, 2013

The easiest way to describe the bug is to link to a stackoverflow posting I made regarding the bug.

http://stackoverflow.com/questions/16181742/haskell-llvm-duplicate-functions-created

The problem is that inside a monad the call
newNamedFunction "putchar"
is called twice. This results in two declarations in the IR file
"putchar" and "putchar1"

This does not have the desired effect. Perhaps, as suggested, this should be an error.

@Ralith
Copy link
Collaborator

Ralith commented Jun 10, 2013

This is a deliberate feature of the upstream LLVM API, intended to ensure that API users don't need to worry about name mangling. I'm not convinced that it's appropriate to deviate from that in the binding.

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