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

Missing Function Attribute "NoFree" #282

Closed
ogerlach opened this issue Oct 24, 2019 · 2 comments · Fixed by #284
Closed

Missing Function Attribute "NoFree" #282

ogerlach opened this issue Oct 24, 2019 · 2 comments · Fixed by #284

Comments

@ogerlach
Copy link

ogerlach commented Oct 24, 2019

I encountered a problem when reading in an LLVM IR and raising it to Haskell AST with moduleAST. After upgrading to llvm-hs 9.0.1 from llvm-hs-8.0.0 I get the following error:

unhandled function attribute enum value: FunctionAttributeKind 26

I could not figure out exactly what FunctionAttributeKind 26 is, but looking at the IR generated by clang, the only new attribute is nofree. This attribute is present in LLVM language reference for version 9 but not for version 8. As far as I can tell, this attribute is not handled in LLVM/Internal/Attribute.hs. Therefore, I assume that nofree causes the error. I hope this information helps for people with more knowledege of LLVM internals than I have.

cocreature added a commit to cocreature/llvm-hs that referenced this issue Nov 15, 2019
@cocreature
Copy link
Member

Hi, sorry for the lack of response. This should be fixed by #284

@shrebhan
Copy link

shrebhan commented Apr 15, 2022

@cocreature @ogerlach Hello! I am facing this issue while parsing a .ll file generated using gllvm, and I want to build llvm-hs from source, are there any steps for this using Cabal ? My project isn't a big project so it doesn't have a project file, I've done all the installation manually. I have cloned the llvm-hs repo, checked out to the llvm-9 branch (which has this fix - #284) but not sure what to do after this, if someone could help me with the steps, it would be great

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

Successfully merging a pull request may close this issue.

3 participants