[clang] [clang-tools-extra] [clang][NFC] Refactor `clang::Linkage` (PR #71049)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 05:28:16 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!");
----------------
AaronBallman wrote:

I think this is a good approach.

https://github.com/llvm/llvm-project/pull/71049


More information about the cfe-commits mailing list