[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 2 04:50:06 PDT 2023
================
@@ -84,22 +88,33 @@ inline bool isUniqueGVALinkage(GVALinkage L) {
}
inline bool isExternallyVisible(Linkage L) {
- return L >= VisibleNoLinkage;
+ switch (L) {
+ case Linkage::Invalid:
+ llvm_unreachable("Linkage hasn't been computed!");
----------------
Endilll wrote:
@AaronBallman I sprinkled a lot of `llvm_unreachable` in this patch, following an example I've seen in one of the switches on `Linkage`. Let me know if you'd like this to be handled in a different way.
https://github.com/llvm/llvm-project/pull/71049
More information about the cfe-commits
mailing list