Skip to content

Commit 5f4dc9b

Browse files
authored
Fix build failure in DXILResource.h on newer versions of MSVC (#139309)
The change #137258 introduced a build break on newer versions of MSVC: ``` llvm\include\llvm\Analysis\DXILResource.h(674) : warning C4715: 'llvm::DXILResourceBindingInfo::getBindingSpaces': not all control paths return a value ``` Fix is to add a `default` case that will ICE.
1 parent 3f42d34 commit 5f4dc9b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/include/llvm/Analysis/DXILResource.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,8 @@ class DXILResourceBindingInfo {
691691
case dxil::ResourceClass::Sampler:
692692
return SamplerSpaces;
693693
}
694+
695+
llvm_unreachable("Invalid resource class");
694696
}
695697

696698
friend class DXILResourceBindingAnalysis;

0 commit comments

Comments
 (0)