-
Notifications
You must be signed in to change notification settings - Fork 187
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
Error while making rtlib example #19
Comments
Hello! As the README says, this repository currently targets LLVM 3.8. Which version are you trying to use? |
I'm using LLVM 8.0. However, I also followed another tutorial by Mike Shah (Northeastern+MIT LLVM Seminar - Introduction to LLVM) that works with LLVM 8.0, and I get the same error using his code. So, I'm thinking it does not have to do with the LLVM version. What do you think? |
I'm not sure about that other tutorial, but I'm nearly certain that this error with this code is version-related. In 3.8, |
OK, that makes sense. Thank you! |
I came here following the Mike Shah's seminar, and I am using LLVM version 11.0. Here is my solution for the problem: and add #include "llvm/IR/Value.h" . Here is the explanation, the FunctionCallee class has a *Value attribute and Value class is a super class of Constant. In the new version of LLVM, the CallInst::Create also takes *Value as parameter rather than *Constant. Alternatively, passing the FunctionCallee as an argument to CallInst::Create might also work. |
To build on the previous answer - the exact changes needed in the Skeleton.cpp code to make it work with LLVM-10 were the following: Change line-23 from Constant *logFunc = F.getParent()->getOrInsertFunction("logop", logFuncType); Change line-34 from builder.CreateCall(logFunc, args); |
Hi,
I ran into an error when I tried to run "make" on the rtlib example. The output is below. Do you have any suggestions on how to fix this error?
Thank you!
The text was updated successfully, but these errors were encountered: