[PATCH] D12903: Allow the -load option in the driver and pass it through to -cc1

John Brawn via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 07:50:09 PDT 2015


john.brawn added a comment.

In http://reviews.llvm.org/D12903#247055, @rengolin wrote:

> Hi John,
>
> Can you expand a bit more on why you need this, what's the use case, and hopefully attach a test for them?


The use-case is loading llvm plugins that add optimization passes via the PassManagerBuilder::addGlobalExtension mechanism (i.e. just loading the plugin is enough and you don't have to add anything extra to the command-line). Currently you have to do clang -Xclang -load -Xclang plugin.so, and it would be nicer to be able to do clang -load plugin.so.

I'm not sure how to best add a test for this. Maybe I should add another pass to llvm that's built as a plugin like llvm/lib/Transforms/Hello but that uses PassManagerBuilder::addGlobalExtension and have a clang test that runs that?


Repository:
  rL LLVM

http://reviews.llvm.org/D12903





More information about the cfe-commits mailing list