Defining a custom attribute that takes an integer argument

I want to create a custom attribute and be able to pass it an integer argument that I can access in my LLVM passes. Any leads on how to go about this?

“Clang” CFE Internals Manual — Clang 17.0.0git documentation has the information about how to add an attribute on Clang’s side.

How To Use Attributes — LLVM 17.0.0git documentation has some information about the LLVM side.