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

builder::build_neg only works for integer inputs #3

Open
pnkfelix opened this issue Sep 1, 2015 · 1 comment
Open

builder::build_neg only works for integer inputs #3

pnkfelix opened this issue Sep 1, 2015 · 1 comment

Comments

@pnkfelix
Copy link

pnkfelix commented Sep 1, 2015

Just a heads up: The API of builder.rs might lead one to think that all the build methods for arithmetic will automatically dispatch to floating point or integer versions of the requested operations based on the input Value types

But the build_neg method does not dispatch to LLVMBuildFNeg when given a floating point value.

(This is easy for client to work around, e.g. by using builder.build_sub(0.0, arg); but it left me scratching my head for quite a while when my code was not passing the LLVM function validator.)

@TomBebbington
Copy link
Owner

Oh, sorry about that. If there isn't a PR by tomorrow I'll make one, then merge it.

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

2 participants