[llvm] [Instrumentor] Use OptionalPassInfoMixin (PR #196333)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 07:47:46 PDT 2026


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/196333

This preserves the existing behavior and makes the pass compliant with \#192120, which is important as inheriting from the normal PassInfoMixin will be going away soonish.

>From dbb417ead8da2c3f9520ac0e20cd6d6f99e17d12 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 7 May 2026 14:45:43 +0000
Subject: [PATCH] [Instrumentor] Use OptionalPassInfoMixin

This preserves the existing behavior and makes the pass compliant with
\#192120, which is important as inheriting from the normal PassInfoMixin
will be going away soonish.
---
 llvm/include/llvm/Transforms/IPO/Instrumentor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/Transforms/IPO/Instrumentor.h b/llvm/include/llvm/Transforms/IPO/Instrumentor.h
index c115bea24bb27..519a01a2626bd 100644
--- a/llvm/include/llvm/Transforms/IPO/Instrumentor.h
+++ b/llvm/include/llvm/Transforms/IPO/Instrumentor.h
@@ -678,7 +678,7 @@ struct LoadIO : public InstructionIO<Instruction::Load> {
 } // namespace instrumentor
 
 /// The Instrumentor pass.
-class InstrumentorPass : public PassInfoMixin<InstrumentorPass> {
+class InstrumentorPass : public OptionalPassInfoMixin<InstrumentorPass> {
   using InstrumentationConfig = instrumentor::InstrumentationConfig;
   using InstrumentorIRBuilderTy = instrumentor::InstrumentorIRBuilderTy;
 



More information about the llvm-commits mailing list