0

I tried to follow the instructions in http://releases.llvm.org/2.6/docs/tutorial/JITTutorial1.html to have make my own function and produce llvm IR. However, executing c++ -g tut1.cpp llvm-config --cxxflags --ldflags --libs core -o tut1, I am stopped by: "llvm/Module.h": No such file or Directory.

Does anyone know how can I solve this problem?

user3126804
  • 119
  • 3
  • 10

1 Answers1

0

2.6 is very old. Try newer LLVM and tutorial, like this one.

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • Thank you for your reply. May I ask how can I make my own IR?(Is there any tutorial for making a code in IR for myself?) – user3126804 May 27 '17 at 14:47
  • @user3126804 You can generate it from C/C++ code using `clang -S -emit-llvm file.c`. Or, you can write it yourself, here is the reference: http://llvm.org/docs/LangRef.html – arrowd May 27 '17 at 15:56