Skip to content

Commit 1348799

Browse files
committed
[DirectX] add maybe_unused to IsVolatile in legalizeMemCpy.
1 parent b58b3e1 commit 1348799

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/DirectX/DXILLegalizePass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ static void legalizeMemCpy(Instruction &I,
470470
Value *Src = CI->getArgOperand(1);
471471
ConstantInt *Length = dyn_cast<ConstantInt>(CI->getArgOperand(2));
472472
assert(Length && "Expected Length to be a ConstantInt");
473-
ConstantInt *IsVolatile = dyn_cast<ConstantInt>(CI->getArgOperand(3));
473+
[[maybe_unused]] ConstantInt *IsVolatile =
474+
dyn_cast<ConstantInt>(CI->getArgOperand(3));
474475
assert(IsVolatile && "Expected IsVolatile to be a ConstantInt");
475476
assert(IsVolatile->getZExtValue() == 0 && "Expected IsVolatile to be false");
476477
emitMemcpyExpansion(Builder, Dst, Src, Length);

0 commit comments

Comments
 (0)