Skip to content

Commit f82bdf0

Browse files
committed
[NFC][Verifier] Remove redundant Module parameters
These `M` parameters shadow the `M` member in `VerifierSupport`, and both always refer to the same module. Eliminate the redundant parameters and always use the member. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D106474
1 parent bdaa181 commit f82bdf0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
424424
for (const StringMapEntry<Comdat> &SMEC : M.getComdatSymbolTable())
425425
visitComdat(SMEC.getValue());
426426

427-
visitModuleFlags(M);
428-
visitModuleIdents(M);
429-
visitModuleCommandLines(M);
427+
visitModuleFlags();
428+
visitModuleIdents();
429+
visitModuleCommandLines();
430430

431431
verifyCompileUnits();
432432

@@ -452,9 +452,9 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
452452
void visitMetadataAsValue(const MetadataAsValue &MD, Function *F);
453453
void visitValueAsMetadata(const ValueAsMetadata &MD, Function *F);
454454
void visitComdat(const Comdat &C);
455-
void visitModuleIdents(const Module &M);
456-
void visitModuleCommandLines(const Module &M);
457-
void visitModuleFlags(const Module &M);
455+
void visitModuleIdents();
456+
void visitModuleCommandLines();
457+
void visitModuleFlags();
458458
void visitModuleFlag(const MDNode *Op,
459459
DenseMap<const MDString *, const MDNode *> &SeenIDs,
460460
SmallVectorImpl<const MDNode *> &Requirements);
@@ -1516,7 +1516,7 @@ void Verifier::visitComdat(const Comdat &C) {
15161516
"comdat global value has private linkage", GV);
15171517
}
15181518

1519-
void Verifier::visitModuleIdents(const Module &M) {
1519+
void Verifier::visitModuleIdents() {
15201520
const NamedMDNode *Idents = M.getNamedMetadata("llvm.ident");
15211521
if (!Idents)
15221522
return;
@@ -1533,7 +1533,7 @@ void Verifier::visitModuleIdents(const Module &M) {
15331533
}
15341534
}
15351535

1536-
void Verifier::visitModuleCommandLines(const Module &M) {
1536+
void Verifier::visitModuleCommandLines() {
15371537
const NamedMDNode *CommandLines = M.getNamedMetadata("llvm.commandline");
15381538
if (!CommandLines)
15391539
return;
@@ -1551,7 +1551,7 @@ void Verifier::visitModuleCommandLines(const Module &M) {
15511551
}
15521552
}
15531553

1554-
void Verifier::visitModuleFlags(const Module &M) {
1554+
void Verifier::visitModuleFlags() {
15551555
const NamedMDNode *Flags = M.getModuleFlagsMetadata();
15561556
if (!Flags) return;
15571557

0 commit comments

Comments
 (0)