[llvm] ebf7858 - [Verifier] Remove redundant null-check (NFC) (#157458)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 18:58:54 PDT 2025


Author: Daniel Kuts
Date: 2025-09-10T09:58:49+08:00
New Revision: ebf78588b1df062accec7aaf8a88c6430090ea18

URL: https://github.com/llvm/llvm-project/commit/ebf78588b1df062accec7aaf8a88c6430090ea18
DIFF: https://github.com/llvm/llvm-project/commit/ebf78588b1df062accec7aaf8a88c6430090ea18.diff

LOG: [Verifier] Remove redundant null-check (NFC) (#157458)

Fixes #157448

Added: 
    

Modified: 
    llvm/lib/IR/Verifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index f38871f09f35f..81a53722f4899 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -3185,7 +3185,7 @@ void Verifier::visitFunction(const Function &F) {
 
     // Scope and SP could be the same MDNode and we don't want to skip
     // validation in that case
-    if (SP && ((Scope != SP) && !Seen.insert(SP).second))
+    if ((Scope != SP) && !Seen.insert(SP).second)
       return;
 
     CheckDI(SP->describes(&F),


        


More information about the llvm-commits mailing list