This patch adds the -fpass-plugin option to flang which dynamically loads LLVM passes from the shared object passed as the argument to the flag. The behavior of the option is designed to replicate that of the same option in clang and thus has the same capabilities and limitations.
Features:
- Multiple instances of -fpass-plugin=path-to-file can be specified and each of the files will be loaded in that order.
- The flag can be passed to both flang-new and flang-new -fc1.
- The flag will be listed when the -help flag is passed to both flang-new and flang-new -fc1. It will also be listed when the --help-hidden flag is passed.
This is not really something within the scope of this patch, but AddOtherOptions should be renamed as e.g. ForwardToFC1 or something similar.