From 31acfe5c2c68420367241db4b0f23e56c2ccbe8c Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 23 Sep 2019 13:20:47 +0000 Subject: [PATCH] [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. llvm-svn: 372604 --- llvm/include/llvm/Analysis/ValueTracking.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h index 0a3fab3..33b064f 100644 --- a/llvm/include/llvm/Analysis/ValueTracking.h +++ b/llvm/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; -- 2.7.4