Skip to content

Commit 270f56a

Browse files
authored
Merge pull request #82042 from j-hui/silence-warnings
[NFC] Silence some unused variable warnings
2 parents b67050b + 8aca536 commit 270f56a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/AST/LifetimeDependence.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ class LifetimeDependenceInfo {
236236
paramIndicesLength = inheritLifetimeParamIndices->getCapacity();
237237
}
238238
if (scopeLifetimeParamIndices) {
239-
assert(paramIndicesLength == 0 ||
239+
ASSERT(paramIndicesLength == 0 ||
240240
paramIndicesLength == scopeLifetimeParamIndices->getCapacity());
241241
paramIndicesLength = scopeLifetimeParamIndices->getCapacity();
242242
}
243243
if (addressableParamIndices) {
244-
assert(paramIndicesLength == 0 ||
244+
ASSERT(paramIndicesLength == 0 ||
245245
paramIndicesLength == addressableParamIndices->getCapacity());
246246
paramIndicesLength = addressableParamIndices->getCapacity();
247247
}

include/swift/AST/Types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3583,13 +3583,13 @@ class AnyFunctionType : public TypeBase {
35833583
Bits.AnyFunctionType.NumParams = NumParams;
35843584
assert(Bits.AnyFunctionType.NumParams == NumParams && "Params dropped!");
35853585

3586-
if (Info) {
3586+
if (Info && CONDITIONAL_ASSERT_enabled()) {
35873587
unsigned maxLifetimeTarget = NumParams + 1;
35883588
if (auto outputFn = Output->getAs<AnyFunctionType>()) {
35893589
maxLifetimeTarget += outputFn->getNumParams();
35903590
}
35913591
for (auto &dep : Info->getLifetimeDependencies()) {
3592-
assert(dep.getTargetIndex() < maxLifetimeTarget);
3592+
ASSERT(dep.getTargetIndex() < maxLifetimeTarget);
35933593
}
35943594
}
35953595
}

0 commit comments

Comments
 (0)