Coverage of the LLVM compiler source code when compiling a program

I’d like to compile some LLVM IR (LLVM code) using the LLVM compiler and check the line coverage and other coverage information on the compiler itself.

I’ve seen other people do something similar by adding their own C code to the test suite and running the test suite with coverage on the LLVM compiler (but they did not document their method, only showed the results).

How should I approach this?