[ValueTracking] Remove unused matchSelectPattern optional argument. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Sep 2019 13:20:47 +0000 (13:20 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Sep 2019 13:20:47 +0000 (13:20 +0000)
The matchSelectPattern const wrapper is never explicitly called with the optional Instruction::CastOps argument, and it turns out that it wasn't being forwarded to matchSelectPattern anyway!

Noticed while investigating clang static analyzer warnings.

llvm-svn: 372604

llvm/include/llvm/Analysis/ValueTracking.h

index 0a3fab3..33b064f 100644 (file)
@@ -620,12 +620,12 @@ class Value;
   SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS,
                                          Instruction::CastOps *CastOp = nullptr,
                                          unsigned Depth = 0);
+
   inline SelectPatternResult
-  matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS,
-                     Instruction::CastOps *CastOp = nullptr) {
-    Value *L = const_cast<Value*>(LHS);
-    Value *R = const_cast<Value*>(RHS);
-    auto Result = matchSelectPattern(const_cast<Value*>(V), L, R);
+  matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS) {
+    Value *L = const_cast<Value *>(LHS);
+    Value *R = const_cast<Value *>(RHS);
+    auto Result = matchSelectPattern(const_cast<Value *>(V), L, R);
     LHS = L;
     RHS = R;
     return Result;