From 236082a0fe4dcd0362c5c74923a93e3db6a01291 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Thu, 13 Aug 2026 05:45:37 +0800 Subject: [CodeGen] Align pass manager ownership --- backend/unittests/CodeGen/TwoAddressInstructionPassTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backend/unittests/CodeGen/TwoAddressInstructionPassTest.cpp') diff --git a/backend/unittests/CodeGen/TwoAddressInstructionPassTest.cpp b/backend/unittests/CodeGen/TwoAddressInstructionPassTest.cpp index 6853a36..e3ad4eb 100644 --- a/backend/unittests/CodeGen/TwoAddressInstructionPassTest.cpp +++ b/backend/unittests/CodeGen/TwoAddressInstructionPassTest.cpp @@ -3,7 +3,7 @@ #include "rcc/CodeGen/TwoAddressInstructionPass.h" #include "SSAExitTestSupport.h" -#include "rcc/CodeGen/MachinePass.h" +#include "rcc/CodeGen/MachinePassManager.h" #include "rcc/CodeGen/MachineVerifier.h" #include @@ -130,11 +130,11 @@ void testTwoAddressAndSubregisterPseudos(TestContext &Context, const rcc::Target if (!InitialLiveness) return; Function.properties().set(rcc::MachineFunctionProperty::NoPHIs); - rcc::MachinePassManager Pipeline; + rcc::MachineFunctionPassManager Pipeline; Context.expect( Pipeline.addPass(std::make_unique(Info)).has_value(), "two-address pass must be registered"); - rcc::MachineAnalysisManager Analyses; + rcc::MachineFunctionAnalysisManager Analyses; auto Run = Pipeline.run(Function, Target, Analyses); Context.expect(Run.has_value(), "two-address rewrite must succeed"); if (!Run) @@ -238,7 +238,7 @@ void testTwoAddressAndSubregisterPseudos(TestContext &Context, const rcc::Target const std::uint64_t AtomicPropertiesBefore = AtomicFixture.Function->properties().rawValue(); TestInstrInfo RejectingInfo(true); - rcc::MachineAnalysisManager AtomicAnalyses; + rcc::MachineFunctionAnalysisManager AtomicAnalyses; rcc::TwoAddressInstructionPass FailingPass(RejectingInfo); auto Failed = FailingPass.run(*AtomicFixture.Function, Target, AtomicAnalyses); Context.expect(!Failed && Failed.error().code() == rcc::ErrorCode::Unsupported, -- cgit v1.2.3