[Mlir-commits] [mlir] [mlir][IR] Fix symbol visibility API (PR #218910)
Mehdi Amini
llvmlistbot at llvm.org
Wed Aug 26 05:04:13 PDT 2026
================
@@ -45,10 +45,13 @@ following properties:
* A `StringAttr` attribute named
'SymbolTable::getSymbolAttrName()'(`sym_name`).
- This attribute defines the symbolic 'name' of the operation.
-* An optional `StringAttr` attribute named
- 'SymbolTable::getVisibilityAttrName()'(`sym_visibility`)
- - This attribute defines the [visibility](#symbol-visibility) of the
- symbol, or more specifically in-which scopes it may be accessed.
+* A [visibility](#symbol-visibility) (`getVisibility`/`setVisibility`)
+ - The visibility defines in which scopes the symbol may be accessed.
+ - By default this is stored in an optional `StringAttr` attribute named
+ 'SymbolOpInterface::getDefaultVisibilityAttrName()'(`sym_visibility`),
+ where the absence of the attribute means public visibility. Operations
+ may override `getVisibility`/`setVisibility` to use a different
+ representation.
----------------
joker-eph wrote:
```suggestion
representation, client code should not have expectation on the presence of an
attribute accessible by named key.
```
https://github.com/llvm/llvm-project/pull/218910
More information about the Mlir-commits
mailing list