From: Simon Pilgrim Date: Mon, 23 Sep 2019 13:20:47 +0000 (+0000) Subject: [ValueTracking] Remove unused matchSelectPattern optional argument. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a1b329567bd722ccc26567b7c3cbe6efdf1f881;p=llvm [ValueTracking] Remove unused matchSelectPattern optional argument. NFCI. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372604 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index 0a3fab3fb71..33b064fcf9d 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -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(LHS); - Value *R = const_cast(RHS); - auto Result = matchSelectPattern(const_cast(V), L, R); + matchSelectPattern(const Value *V, const Value *&LHS, const Value *&RHS) { + Value *L = const_cast(LHS); + Value *R = const_cast(RHS); + auto Result = matchSelectPattern(const_cast(V), L, R); LHS = L; RHS = R; return Result;