read an external file in a function/module pass

Hello All,

I have a custom function & module pass. I’m invoking these passes using OPT. I would like to read an external YAML file inside the pass. I could pass the file as a command-line argument to the OPT, I could not find the options available.

Are there any options or is there another way to read the file?

https://llvm.org/docs/Passes.html

https://llvm.org/docs/CommandGuide/opt.html

Thanks and Regards.