Skip to content

Commit 311a2e5

Browse files
committed
clean up
1 parent 5910271 commit 311a2e5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,17 @@ tripleToVisibility(llvm::Triple::EnvironmentType ET) {
162162

163163
static void reportIfDeniedShaderStageAccess(Module &M, dxbc::RootFlags Flags,
164164
dxbc::RootFlags Mask) {
165-
if ((Flags & Mask) == Mask) {
166-
SmallString<128> Message;
167-
raw_svector_ostream OS(Message);
168-
OS << "Shader has root bindings but root signature uses a DENY flag to "
169-
"disallow root binding access to the shader stage.";
170-
M.getContext().diagnose(DiagnosticInfoGeneric(Message));
171-
}
165+
if ((Flags & Mask) != Mask)
166+
return;
167+
168+
SmallString<128> Message;
169+
raw_svector_ostream OS(Message);
170+
OS << "Shader has root bindings but root signature uses a DENY flag to "
171+
"disallow root binding access to the shader stage.";
172+
M.getContext().diagnose(DiagnosticInfoGeneric(Message));
172173
}
173174

175+
174176
static void validateRootSignature(Module &M,
175177
const mcdxbc::RootSignatureDesc &RSD,
176178
dxil::ModuleMetadataInfo &MMI,

0 commit comments

Comments
 (0)