[llvm] llvm-reduce: Use takeName when moving arguments in operands-to-args (PR #133851)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 31 21:24:11 PDT 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/133851
None
>From 1fa14d1884fa909904abf0d1a072b81687648246 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Tue, 1 Apr 2025 11:23:31 +0700
Subject: [PATCH] llvm-reduce: Use takeName when moving arguments in
operands-to-args
---
llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
index 3548130d3276a..4bae588d60c14 100644
--- a/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
+++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp
@@ -155,8 +155,8 @@ static void substituteOperandWithArgument(Function *OldF,
Argument &OldArg = std::get<0>(Z);
Argument &NewArg = std::get<1>(Z);
- NewArg.setName(OldArg.getName()); // Copy the name over...
- VMap[&OldArg] = &NewArg; // Add mapping to VMap
+ NewArg.takeName(&OldArg); // Copy the name over...
+ VMap[&OldArg] = &NewArg; // Add mapping to VMap
}
LLVMContext &Ctx = OldF->getContext();
More information about the llvm-commits
mailing list