Skip to content

Commit 83ee5fe

Browse files
committed
addressing comments from bogner
1 parent 18f9e9c commit 83ee5fe

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,13 @@ static void validateRootSignature(Module &M,
294294

295295
HasBindings = true;
296296
}
297-
const std::optional<dxbc::RootFlags> Mask =
298-
getEnvironmentDenyFlagMask(MMI.ShaderProfile);
299297

300-
if (!Mask.has_value() || !HasBindings)
298+
if (!HasBindings)
301299
return;
302300

303-
const dxbc::RootFlags Flags = dxbc::RootFlags(RSD.Flags);
304-
reportIfDeniedShaderStageAccess(M, Flags, Mask.value());
301+
if (std::optional<dxbc::RootFlags> Mask =
302+
getEnvironmentDenyFlagMask(MMI.ShaderProfile))
303+
reportIfDeniedShaderStageAccess(M, dxbc::RootFlags(RSD.Flags), *Mask);
305304
}
306305

307306
static mcdxbc::RootSignatureDesc *

0 commit comments

Comments
 (0)