nikic added a comment.

If you are not invoking all the needed callbacks in 
invokeRegisteredO0EPCallbacks(), I would suggest to instead provide a set of 
methods like invokePipelineStartEPCallbacks(), invokeOptimizerLastEPCallbacks() 
that allow the consumer to chose which callbacks to invoke. (Just those two 
would be sufficient for my purposes.)

I'd really like to avoid this dance: 
https://github.com/rust-lang/rust/blob/c71248b70870960af9993de4f31d3cba9bbce7e8/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp#L796
 Where you need to separately collect all callbacks yourself, because the 
PassBuilder neither makes the necessary members public, nor provides a means to 
invoke the callbacks explicitly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89158/new/

https://reviews.llvm.org/D89158

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to