I’ve downloaded LLVM and Clang from SVN, built them, and written a tiny sample program. However, the LLVM headers (llvm/support/type_traits.h) appear to include another LLVM header, llvm/support/DataTypes.h, which does not exist. I checked the documentation on the LLVM website and they don’t seem to think it should exist either.
How can I fix this issue?
Some file are auto-generated into the build directory. When compiling your programs to use LLVM as a library, always use the
llvm-configtool to provide you with the right header directories and library directories for linking. I have this in myMakefile:And I use it on the compiler command-line.
Where
LLVM_BUILD_PATHis the path where you ranconfigure, and the rest of it depends on which version you have built (I usually use the Debug+Asserts one for hacking inside LLVM).