[llvm] f82bdf0 - [NFC][Verifier] Remove redundant Module parameters
Scott Linder via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 5 14:30:51 PDT 2021
Author: Scott Linder
Date: 2021-11-05T21:30:02Z
New Revision: f82bdf0fccb74f4b00c905b1e44dabdd099354fb
URL: https://github.com/llvm/llvm-project/commit/f82bdf0fccb74f4b00c905b1e44dabdd099354fb
DIFF: https://github.com/llvm/llvm-project/commit/f82bdf0fccb74f4b00c905b1e44dabdd099354fb.diff
LOG: [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
Added:
Modified:
llvm/lib/IR/Verifier.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 1e0f8b5b82c9..8985b9ca7087 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -424,9 +424,9 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
for (const StringMapEntry<Comdat> &SMEC : M.getComdatSymbolTable())
visitComdat(SMEC.getValue());
- visitModuleFlags(M);
- visitModuleIdents(M);
- visitModuleCommandLines(M);
+ visitModuleFlags();
+ visitModuleIdents();
+ visitModuleCommandLines();
verifyCompileUnits();
@@ -452,9 +452,9 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
void visitMetadataAsValue(const MetadataAsValue &MD, Function *F);
void visitValueAsMetadata(const ValueAsMetadata &MD, Function *F);
void visitComdat(const Comdat &C);
- void visitModuleIdents(const Module &M);
- void visitModuleCommandLines(const Module &M);
- void visitModuleFlags(const Module &M);
+ void visitModuleIdents();
+ void visitModuleCommandLines();
+ void visitModuleFlags();
void visitModuleFlag(const MDNode *Op,
DenseMap<const MDString *, const MDNode *> &SeenIDs,
SmallVectorImpl<const MDNode *> &Requirements);
@@ -1516,7 +1516,7 @@ void Verifier::visitComdat(const Comdat &C) {
"comdat global value has private linkage", GV);
}
-void Verifier::visitModuleIdents(const Module &M) {
+void Verifier::visitModuleIdents() {
const NamedMDNode *Idents = M.getNamedMetadata("llvm.ident");
if (!Idents)
return;
@@ -1533,7 +1533,7 @@ void Verifier::visitModuleIdents(const Module &M) {
}
}
-void Verifier::visitModuleCommandLines(const Module &M) {
+void Verifier::visitModuleCommandLines() {
const NamedMDNode *CommandLines = M.getNamedMetadata("llvm.commandline");
if (!CommandLines)
return;
@@ -1551,7 +1551,7 @@ void Verifier::visitModuleCommandLines(const Module &M) {
}
}
-void Verifier::visitModuleFlags(const Module &M) {
+void Verifier::visitModuleFlags() {
const NamedMDNode *Flags = M.getModuleFlagsMetadata();
if (!Flags) return;
More information about the llvm-commits
mailing list