Skip to content

Commit c212183

Browse files
authored
[DirectX] add maybe_unused to IsVolatile in legalizeMemCpy. (#143040)
fixes a warning when building release.
1 parent de3a9ea commit c212183

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)