1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00

[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
This commit is contained in:
Simon Pilgrim 2019-09-23 13:20:47 +00:00
parent bd74cf9f63
commit 3b784b9457

View 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;