Skip to content

Commit

Permalink
[IPO] Fix uused-variable warnings
Browse files Browse the repository at this point in the history
This patch fixes:

  llvm/lib/Transforms/IPO/AttributorAttributes.cpp:2038:10: error:
  unused variable 'IsKnown' [-Werror,-Wunused-variable]
  • Loading branch information
kazutakahirata committed Jul 10, 2023
1 parent 3450272 commit 60db0b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,7 @@ struct AANoUnwindImpl : AANoUnwind {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::NoUnwind>(
A, nullptr, getIRPosition(), DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

const std::string getAsStr(Attributor *A) const override {
Expand Down Expand Up @@ -2422,6 +2423,7 @@ struct AANoSyncImpl : AANoSync {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::NoSync>(A, nullptr, getIRPosition(),
DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

const std::string getAsStr(Attributor *A) const override {
Expand Down Expand Up @@ -2502,6 +2504,7 @@ struct AANoFreeImpl : public AANoFree {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::NoFree>(A, nullptr, getIRPosition(),
DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

/// See AbstractAttribute::updateImpl(...).
Expand Down Expand Up @@ -2939,6 +2942,7 @@ struct AAMustProgressImpl : public AAMustProgress {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::MustProgress>(
A, nullptr, getIRPosition(), DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

/// See AbstractAttribute::getAsStr()
Expand Down Expand Up @@ -3021,6 +3025,7 @@ struct AANoRecurseImpl : public AANoRecurse {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::NoRecurse>(
A, nullptr, getIRPosition(), DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

/// See AbstractAttribute::getAsStr()
Expand Down Expand Up @@ -3528,6 +3533,7 @@ struct AAWillReturnImpl : public AAWillReturn {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::WillReturn>(
A, nullptr, getIRPosition(), DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

/// Check for `mustprogress` and `readonly` as they imply `willreturn`.
Expand Down Expand Up @@ -5659,6 +5665,7 @@ struct AANoReturnImpl : public AANoReturn {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::NoReturn>(
A, nullptr, getIRPosition(), DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

/// See AbstractAttribute::getAsStr().
Expand Down Expand Up @@ -5992,6 +5999,7 @@ struct AANoCaptureImpl : public AANoCapture {
bool IsKnown;
assert(!AA::hasAssumedIRAttr<Attribute::NoCapture>(
A, nullptr, getIRPosition(), DepClassTy::NONE, IsKnown));
(void)IsKnown;
}

/// See AbstractAttribute::updateImpl(...).
Expand Down

0 comments on commit 60db0b8

Please sign in to comment.