@@ -413,18 +413,18 @@ class SILBuilder {
413
413
AllocStackInst *createAllocStack (SILLocation Loc, SILType elementType,
414
414
Optional<SILDebugVariable> Var = None,
415
415
bool hasDynamicLifetime = false ,
416
- bool isLexical = false , bool wasMoved = false
417
- #ifndef NDEBUG
418
- ,
416
+ bool isLexical = false ,
417
+ bool wasMoved = false ,
419
418
bool skipVarDeclAssert = false
420
- #endif
421
419
) {
422
420
llvm::SmallString<4 > Name;
423
421
Loc.markAsPrologue ();
424
422
#ifndef NDEBUG
425
423
if (dyn_cast_or_null<VarDecl>(Loc.getAsASTNode <Decl>()))
426
424
assert ((skipVarDeclAssert || Loc.isSynthesizedAST () || Var) &&
427
425
" location is a VarDecl, but SILDebugVariable is empty" );
426
+ #else
427
+ (void )skipVarDeclAssert;
428
428
#endif
429
429
return insert (AllocStackInst::create (
430
430
getSILDebugLocation (Loc, true ), elementType, getFunction (),
@@ -473,19 +473,20 @@ class SILBuilder {
473
473
return createAllocBox (loc, SILBoxType::get (fieldType.getASTType ()), Var,
474
474
hasDynamicLifetime, reflection,
475
475
usesMoveableValueDebugInfo,
476
- /* skipVarDeclAssert*/ false , hasPointerEscape);
476
+ /* skipVarDeclAssert*/ false ,
477
+ hasPointerEscape);
477
478
}
478
479
479
480
AllocBoxInst *createAllocBox (SILLocation Loc, CanSILBoxType BoxType,
480
481
Optional<SILDebugVariable> Var = None,
481
482
bool hasDynamicLifetime = false ,
482
483
bool reflection = false ,
483
- bool usesMoveableValueDebugInfo = false
484
- #ifndef NDEBUG
485
- ,
484
+ bool usesMoveableValueDebugInfo = false ,
486
485
bool skipVarDeclAssert = false ,
487
- #endif
488
486
bool hasPointerEscape = false ) {
487
+ #if NDEBUG
488
+ (void )skipVarDeclAssert;
489
+ #endif
489
490
llvm::SmallString<4 > Name;
490
491
Loc.markAsPrologue ();
491
492
assert ((skipVarDeclAssert ||
0 commit comments