Skip to content

Commit

Permalink
[TableGen] Fix unused-variable warnings in CodeGenSchedule.cpp (NFC)
Browse files Browse the repository at this point in the history
/llvm-project/llvm/utils/TableGen/Common/CodeGenSchedule.cpp:1704:32:
 error: unused variable 'Seq' [-Werror,-Wunused-variable]
    SmallVectorImpl<unsigned> &Seq =
                               ^
/llvm-project/llvm/utils/TableGen/Common/CodeGenSchedule.cpp:1713:32:
 error: unused variable 'Seq' [-Werror,-Wunused-variable]
    SmallVectorImpl<unsigned> &Seq =
                               ^
2 errors generated.
  • Loading branch information
DamonFool committed Jan 18, 2025
1 parent 909bf38 commit d79e3af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/utils/TableGen/Common/CodeGenSchedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ void CodeGenSchedModels::inferFromRW(ArrayRef<unsigned> OperWrites,
for (unsigned WriteIdx : OperWrites) {
IdxVec WriteSeq;
expandRWSequence(WriteIdx, WriteSeq, /*IsRead=*/false);
SmallVectorImpl<unsigned> &Seq =
[[maybe_unused]] SmallVectorImpl<unsigned> &Seq =
LastTransitions[0].WriteSequences.emplace_back(WriteSeq.begin(),
WriteSeq.end());
LLVM_DEBUG(dbgs() << "("; dumpIdxVec(Seq); dbgs() << ") ");
Expand All @@ -1710,7 +1710,7 @@ void CodeGenSchedModels::inferFromRW(ArrayRef<unsigned> OperWrites,
for (unsigned ReadIdx : OperReads) {
IdxVec ReadSeq;
expandRWSequence(ReadIdx, ReadSeq, /*IsRead=*/true);
SmallVectorImpl<unsigned> &Seq =
[[maybe_unused]] SmallVectorImpl<unsigned> &Seq =
LastTransitions[0].ReadSequences.emplace_back(ReadSeq.begin(),
ReadSeq.end());
LLVM_DEBUG(dbgs() << "("; dumpIdxVec(Seq); dbgs() << ") ");
Expand Down

0 comments on commit d79e3af

Please sign in to comment.