Skip to content

Commit 52e5abe

Browse files
author
Greg Roth
committed
use maybe_unused instead of NDEBUG
Response to feedback on debug code
1 parent 6cbfc40 commit 52e5abe

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/HLSL/HLOperationLower.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7899,11 +7899,9 @@ Value *TranslateStructBufMatLd(CallInst *CI, IRBuilder<> &Builder,
78997899
void TranslateStructBufMatSt(Type *matType, IRBuilder<> &Builder, Value *handle,
79007900
hlsl::OP *OP, Value *bufIdx, Value *baseOffset,
79017901
Value *val, const DataLayout &DL) {
7902-
#ifndef NDEBUG
7903-
HLMatrixType MatTy = HLMatrixType::cast(matType);
7902+
[[maybe_unused]] HLMatrixType MatTy = HLMatrixType::cast(matType);
79047903
DXASSERT(MatTy.getLoweredVectorType(false /*MemRepr*/) == val->getType(),
79057904
"helper type should match vectorized matrix");
7906-
#endif
79077905
TranslateStore(DxilResource::Kind::StructuredBuffer, handle, val, bufIdx,
79087906
baseOffset, Builder, OP);
79097907
}

0 commit comments

Comments
 (0)