https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/241103

The last callers of the CIRGenModule::getMLIRVisibility overload taking
clang::Visibility were removed on November 10, 2026 in commit
07a5b49195119547bc6420bde79a5b714153faca.

Assisted-by: Antigravity


>From e5ed10d7c30f91be28d961ad42015868c5735b9f Mon Sep 17 00:00:00 2001
From: Kazu Hirata <[email protected]>
Date: Tue, 10 Nov 2026 15:20:31 -0800
Subject: [PATCH] [CIR] Remove unused CIRGenModule::getMLIRVisibility overload
 (NFC)

The last callers of the CIRGenModule::getMLIRVisibility overload taking
clang::Visibility were removed on November 10, 2026 in commit
07a5b49195119547bc6420bde79a5b714153faca.

Assisted-by: Antigravity
---
 clang/lib/CIR/CodeGen/CIRGenModule.h | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.h 
b/clang/lib/CIR/CodeGen/CIRGenModule.h
index 2d606eb977a5a..480d1ee291570 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.h
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.h
@@ -452,24 +452,6 @@ class CIRGenModule : public CIRGenTypeCache {
   mlir::Attribute getAddrOfRTTIDescriptor(mlir::Location loc, QualType ty,
                                           bool forEH = false);
 
-  static mlir::SymbolTable::Visibility getMLIRVisibility(Visibility v) {
-    switch (v) {
-    case DefaultVisibility:
-      return mlir::SymbolTable::Visibility::Public;
-    case HiddenVisibility:
-      return mlir::SymbolTable::Visibility::Private;
-    case ProtectedVisibility:
-      // The distinction between ProtectedVisibility and DefaultVisibility is
-      // that symbols with ProtectedVisibility, while visible to the dynamic
-      // linker like DefaultVisibility, are guaranteed to always dynamically
-      // resolve to a symbol in the current shared object. There is currently 
no
-      // equivalent MLIR visibility, so we fall back on the fact that the 
symbol
-      // is visible.
-      return mlir::SymbolTable::Visibility::Public;
-    }
-    llvm_unreachable("unknown visibility!");
-  }
-
   static cir::VisibilityKind getCIRVisibilityKind(Visibility v) {
     switch (v) {
     case DefaultVisibility:

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to