Skip to content

Commit f08720b

Browse files
committed
Remove #ifndef on skipVarDeclAssert in SILBuilder::createAllocBox signature
1 parent 8ccabbd commit f08720b

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

include/swift/SIL/SILBuilder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,14 @@ class SILBuilder {
480480
Optional<SILDebugVariable> Var = None,
481481
bool hasDynamicLifetime = false,
482482
bool reflection = false,
483-
bool usesMoveableValueDebugInfo = false
484-
#ifndef NDEBUG
485-
,
483+
bool usesMoveableValueDebugInfo = false,
486484
bool skipVarDeclAssert = false,
487-
#endif
488485
bool hasPointerEscape = false) {
489486
llvm::SmallString<4> Name;
490487
Loc.markAsPrologue();
488+
#if defined(NDEBUG)
489+
(void) skipVarDeclAssert;
490+
#endif
491491
assert((skipVarDeclAssert ||
492492
!dyn_cast_or_null<VarDecl>(Loc.getAsASTNode<Decl>()) || Var) &&
493493
"location is a VarDecl, but SILDebugVariable is empty");

include/swift/SIL/SILCloner.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -955,11 +955,9 @@ SILCloner<ImplClass>::visitAllocBoxInst(AllocBoxInst *Inst) {
955955
Inst,
956956
getBuilder().createAllocBox(
957957
Loc, this->getOpType(Inst->getType()).template castTo<SILBoxType>(),
958-
VarInfo, false, false, false
959-
#ifndef NDEBUG
960-
,
961-
true
962-
#endif
958+
VarInfo, /*hasDynamicLifetime*/ false,
959+
/*reflection*/ false,
960+
/*usesMoveableValueDebugInfo*/ false, /*skipVarDeclAssert*/ true
963961
));
964962
}
965963

lib/SILGen/SILGenDecl.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,10 @@ class LocalVariableInitialization : public SingleBufferInitialization {
519519
Optional<SILDebugVariable> DbgVar;
520520
if (generateDebugInfo)
521521
DbgVar = SILDebugVariable(decl->isLet(), ArgNo);
522-
Box = SGF.B.createAllocBox(decl, boxType, DbgVar, false, false, false
523-
#ifndef NDEBUG
524-
,
525-
!generateDebugInfo
526-
#endif
527-
);
522+
Box = SGF.B.createAllocBox(
523+
decl, boxType, DbgVar, /*hasDynamicLifetime*/ false,
524+
/*reflection*/ false, /*usesMoveableValueDebugInfo*/ false,
525+
!generateDebugInfo);
528526

529527
// Mark the memory as uninitialized, so DI will track it for us.
530528
if (kind)

0 commit comments

Comments
 (0)