Skip to content

Commit ddfc573

Browse files
committed
Switch from assert to ASSERT
1 parent ee7226e commit ddfc573

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/Differentiation/PullbackCloner.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,7 +2507,7 @@ bool PullbackCloner::Implementation::run() {
25072507
continue;
25082508
}
25092509

2510-
assert(getTangentValueCategory(bbActiveValue) ==
2510+
ASSERT(getTangentValueCategory(bbActiveValue) ==
25112511
SILValueCategory::Address);
25122512

25132513
// getAdjointProjection might call materializeAdjointDirect which
@@ -2524,7 +2524,7 @@ bool PullbackCloner::Implementation::run() {
25242524
// All adjoint buffers are allocated in the pullback entry and
25252525
// deallocated in the pullback exit. So, use IsNotInitialization to
25262526
// emit destroy_addr before zeroing the buffer.
2527-
assert(bufferMap.contains({bb, bbActiveValue}));
2527+
ASSERT(bufferMap.contains({bb, bbActiveValue}));
25282528
builder.emitZeroIntoBuffer(pbLoc, getAdjointBuffer(bb, bbActiveValue),
25292529
IsNotInitialization);
25302530

@@ -2577,7 +2577,7 @@ bool PullbackCloner::Implementation::run() {
25772577
break;
25782578
}
25792579

2580-
assert(false);
2580+
ASSERT(false);
25812581
} while (false);
25822582
}
25832583
}

0 commit comments

Comments
 (0)