How can a pass obtain the path of input file?

Hi all
I write a pass, which will link two module together,
Is there some method that I can obtain the path of the input file?
If so, I can get the module by the path of the input.

Or Is there some method that I can obtain the two modules of the input file by opt?

Thanks,
yaoxiao

There is already code in LLVM that does this. Is there a reason why you’re writing your own version? I don’t know of any way to do this. The bytecode, in general, may not be coming from a file. It may come from a pipe on standard input, for example, on a Unix system. – John T.