[llvm] [CodeGen] Expose the extensibility of PassConfig to plugins (PR #139059)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 25 06:21:27 PDT 2025
================
@@ -119,6 +119,9 @@ addPassesToGenerateCode(CodeGenTargetMachineImpl &TM, PassManagerBase &PM,
PM.add(PassConfig);
PM.add(&MMIWP);
+ for (auto& C : *TargetMachine::TargetPassConfigCallbacks)
----------------
antoniofrighetto wrote:
I think it's fine to use auto when code readability benefits from not spelling it out, which should be the case for callable objects (the container TargetPassConfigCallbacks already hints it is a callback item). That said, since we have an alias for the std::function here, `PassConfigCallback &C` should be fine too. @Tcc100 Could you also please run clang-format here? This should have been `auto &C`.
https://github.com/llvm/llvm-project/pull/139059
More information about the llvm-commits
mailing list