================
@@ -250,6 +267,18 @@ class CIRGenModule : public CIRGenTypeCache {
mlir::Attribute getAddrOfRTTIDescriptor(mlir::Location loc, QualType ty,
bool forEH = false);
+ static mlir::SymbolTable::Visibility getCIRVisibility(Visibility v) {
+ switch (v) {
+ case DefaultVisibility:
+ return mlir::SymbolTable::Visibility::Public;
+ case HiddenVisibility:
+ return mlir::SymbolTable::Visibility::Private;
+ case ProtectedVisibility:
+ llvm_unreachable("NYI");
----------------
andykaylor wrote:
```suggestion
// 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;
```
https://github.com/llvm/llvm-project/pull/160002
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits