We have a problem about pass.

Dear, LLVM developers.
We appreciate your interest.

We contacted to solve the problem of setting the pass. Our pass setup process is as follows:

  1. Add pass subdirectory from CMakeLists.txt in llvm/lib/Tranform
  2. Change CMakeLists.txt in llvm/lib/Transform/pass
  3. Run make in llvm/build/lib

However, the desired pass file was not created. There were no errors in the make process.

Installed version is LLVM & clang 8.0.0, CMAKE 3.4.3.
Here is the contents of CMakeLists.txt set in the pass:

add_llvm_module ( Filter MODULE



We are looking forward to hearing from you.

Best regards.

I find it difficult to say something about this, but have you e.g. looked at the Hello pass:


A copy-paste of that and some search/replace will probably get you started? Hello.cpp also refers to the guide how to write a pass. Looking at your cmake file, I am wondering if the “add_llvm_module” is correct.


As per:


and Sjoerd's suggestion, "add_llvm_module" should probably be replaced with "add_llvm_library".