[clang] [CIR] Add support for function linkage and visibility (PR #145600)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 24 14:52:29 PDT 2025


================
@@ -170,6 +187,26 @@ static bool omitRegionTerm(mlir::Region &r) {
   return singleNonEmptyBlock && yieldsNothing();
 }
 
+void printVisibilityAttr(OpAsmPrinter &printer,
+                         cir::VisibilityAttr &visibility) {
+  switch (visibility.getValue()) {
+  case cir::VisibilityKind::Hidden:
+    printer << "hidden";
+    break;
+  case cir::VisibilityKind::Protected:
----------------
erichkeane wrote:

What other values here are there?  Can we skip the `default` here and just have it try to print all?

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


More information about the cfe-commits mailing list