Pass error

Hello1.cpp:1:10: fatal error: ‘llvm/Pass.h’ file not found
#include “llvm/Pass.h”
1 error generated.

Please help

Why has your helloworld got a #include “llvm/Pass.h” in line 1? What are you trying to do? What command did you use to start llvm? What are the values of your environment variables?

I think you’re trying to add a pass to the pipeline.

Clearly the compiler isn’t getting the correct include path. If I’m not mistaken, the cmake build system should pick this up automatically if you put your pass somewhere in one of the correct directories within your llvm source tree and add the file to the corresponding CMakeLists.txt. The “correct directory” will depend on what your pass does (i.e. analysis, transformation, etc.).