[NFC][LLVM] Code cleanup in InstructionNamer.cpp (#162689)

Make file local function static and use explicit type for Arg.
This commit is contained in:
Rahul Joshi 2025-10-10 14:42:05 -07:00 committed by GitHub
parent 44c5dabea3
commit a4a0a4b9b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,9 +20,8 @@
using namespace llvm;
namespace {
void nameInstructions(Function &F) {
for (auto &Arg : F.args()) {
static void nameInstructions(Function &F) {
for (Argument &Arg : F.args()) {
if (!Arg.hasName())
Arg.setName("arg");
}
@ -38,8 +37,6 @@ void nameInstructions(Function &F) {
}
}
} // namespace
PreservedAnalyses InstructionNamerPass::run(Function &F,
FunctionAnalysisManager &FAM) {
nameInstructions(F);