Skip to content

Commit 0f45a33

Browse files
[Scalar] Fix warnings
This patch fixes: llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:689:45: error: lambda capture 'DT' is not used [-Werror,-Wunused-lambda-capture] llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:584:1: error: unused function 'operator<<' [-Werror,-Wunused-function]
1 parent 94fb856 commit 0f45a33

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,7 @@ inline raw_ostream &operator<<(raw_ostream &OS,
579579
return OS;
580580
}
581581

582-
LLVM_DUMP_METHOD
583-
inline raw_ostream &
582+
[[maybe_unused]] LLVM_DUMP_METHOD inline raw_ostream &
584583
operator<<(raw_ostream &OS, const StraightLineStrengthReduce::DeltaInfo &DI) {
585584
OS << "Cand: " << *DI.Cand << "\n";
586585
OS << "Delta Kind: ";
@@ -686,7 +685,7 @@ void StraightLineStrengthReduce::setBasisAndDeltaFor(Candidate &C) {
686685
if (const auto *IndexDeltaCandidates =
687686
CandidateDict.getCandidatesWithDeltaKind(C, Candidate::IndexDelta)) {
688687
bool FoundConstDelta =
689-
SearchFrom(*IndexDeltaCandidates, [&DT = DT, &C](Candidate *Basis) {
688+
SearchFrom(*IndexDeltaCandidates, [&](Candidate *Basis) {
690689
if (isSimilar(C, *Basis, Candidate::IndexDelta)) {
691690
assert(DT->dominates(Basis->Ins, C.Ins));
692691
auto *Delta = getIndexDelta(C, *Basis);

0 commit comments

Comments
 (0)