llvm icon indicating copy to clipboard operation
llvm copied to clipboard

Duplicate declarations

Open ghost opened this issue 11 years ago • 1 comments

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.

ghost avatar Apr 24 '13 22:04 ghost

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.

Ralith avatar Jun 10 '13 07:06 Ralith