projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd5c5f7
)
[NFC] use llvm_unreachable instead of return on switch which all cases are covered.
author
Xiang Li
<python3kgae@outlook.com>
Tue, 18 Oct 2022 00:47:48 +0000
(17:47 -0700)
committer
Xiang Li
<python3kgae@outlook.com>
Tue, 18 Oct 2022 00:47:48 +0000
(17:47 -0700)
clang/lib/CodeGen/CGHLSLRuntime.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CGHLSLRuntime.cpp
b/clang/lib/CodeGen/CGHLSLRuntime.cpp
index
6f32136
..
cfdc1f6
100644
(file)
--- a/
clang/lib/CodeGen/CGHLSLRuntime.cpp
+++ b/
clang/lib/CodeGen/CGHLSLRuntime.cpp
@@
-270,7
+270,7
@@
castResourceShapeToResourceKind(HLSLResourceAttr::ResourceKind RK) {
static_cast<uint32_t>(
HLSLResourceAttr::ResourceKind::FeedbackTexture2DArray) ==
(static_cast<uint32_t>(llvm::hlsl::ResourceKind::NumEntries) - 2));
-
return llvm::hlsl::ResourceKind::Invalid
;
+
llvm_unreachable("all switch cases should be covered")
;
}
void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) {