[PATCH] D62006: Add "llvm_unreachable" for function RegisterBankInfo::getRegBank
Kan Shengchen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 19 21:31:38 PDT 2019
skan updated this revision to Diff 200203.
skan added a comment.
add "const" to pointer type description.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62006/new/
https://reviews.llvm.org/D62006
Files:
lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
Index: lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
===================================================================
--- lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
+++ lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
@@ -91,7 +91,9 @@
return RB;
if (auto *RC = RegClassOrBank.dyn_cast<const TargetRegisterClass *>())
return &getRegBankFromRegClass(*RC);
- return nullptr;
+
+ llvm_unreachable("RegClassOrBank is either a const RegisterBank* or "
+ "a const TargetReigisterClass*");
}
const TargetRegisterClass &
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62006.200203.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190520/66ccabda/attachment.bin>
More information about the llvm-commits
mailing list