[NFC][LLVM] Code cleanup in InstructionNamer.cpp (#162689)
Make file local function static and use explicit type for Arg.
This commit is contained in:
parent
44c5dabea3
commit
a4a0a4b9b1
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user