Sample LLVM pass templates. Adapted from Prof Adrian Sampson's template to include support for Module passes. For more details on how to create a LLVM pass, check out Prof Sampson's LLVM for Grad Students
It's for LLVM 14.
Build:
$ cd llvm-pass-skeleton
$ mkdir build
$ cd build
$ cmake ..
$ make
$ cd ..
Run:
$ clang -flegacy-pass-manager -Xclang -load -Xclang build/skeleton/libSkeletonPass.* something.c