Skip to content

Commit a4a0a4b

Browse files
authored
[NFC][LLVM] Code cleanup in InstructionNamer.cpp (#162689)
Make file local function static and use explicit type for Arg.
1 parent 44c5dab commit a4a0a4b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Transforms/Utils/InstructionNamer.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020

2121
using namespace llvm;
2222

23-
namespace {
24-
void nameInstructions(Function &F) {
25-
for (auto &Arg : F.args()) {
23+
static void nameInstructions(Function &F) {
24+
for (Argument &Arg : F.args()) {
2625
if (!Arg.hasName())
2726
Arg.setName("arg");
2827
}
@@ -38,8 +37,6 @@ void nameInstructions(Function &F) {
3837
}
3938
}
4039

41-
} // namespace
42-
4340
PreservedAnalyses InstructionNamerPass::run(Function &F,
4441
FunctionAnalysisManager &FAM) {
4542
nameInstructions(F);

0 commit comments

Comments
 (0)