[llvm] 49fdee1 - [Analysis] Use != to compare strings (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 30 12:33:18 PST 2022


Author: Kazu Hirata
Date: 2022-01-30T12:32:57-08:00
New Revision: 49fdee13c18ea94971cc291959f5f57b296946a9

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

LOG: [Analysis] Use != to compare strings (NFC)

Identified with readability-string-compare.

Added: 
    

Modified: 
    llvm/lib/Analysis/IRSimilarityIdentifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
index b3bc3ddd62076..01681c47418a9 100644
--- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
+++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
@@ -254,7 +254,7 @@ bool IRSimilarity::isClose(const IRInstructionData &A,
   // name is the same.  We already know that the types are since is
   // isSameOperationAs is true.
   if (isa<CallInst>(A.Inst) && isa<CallInst>(B.Inst)) {
-    if (A.getCalleeName().str().compare(B.getCalleeName().str()) != 0)
+    if (A.getCalleeName().str() != B.getCalleeName().str())
       return false;
   }
 


        


More information about the llvm-commits mailing list