Skip to content

Commit 525c25a

Browse files
authored
[SPIRV] Fix warning in SPIRVMergeRegionExitTargets.cpp (#95283)
Fix warning in SPIRVMergeRegionExitTargets.cpp about "non-void function does not return a value in all control paths" by changing assert to llvm_unreachable.
1 parent 5dc99af commit 525c25a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/SPIRV/SPIRVMergeRegionExitTargets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class SPIRVMergeRegionExitTargets : public FunctionPass {
100100
}
101101

102102
// TODO: add support for switch cases.
103-
assert(false && "Unhandled terminator type.");
103+
llvm_unreachable("Unhandled terminator type.");
104104
}
105105

106106
/// Replaces |BB|'s branch targets present in |ToReplace| with |NewTarget|.

0 commit comments

Comments
 (0)