Skip to content
Commit 94afc426 authored by River Riddle's avatar River Riddle Committed by Mehdi Amini
Browse files

Refactor the support for AffineMap and IntegerSet aliases in the parser...

    Refactor the support for AffineMap and IntegerSet aliases in the parser into more general support for attribute aliases.

      `#` alias `=` attribute-value

    This also allows for dialects to define aliases for attributes in the AsmPrinter. The printer supports two types of attribute aliases, 'direct' and 'kind'.

    * Direct aliases are synonymous with the current support for type aliases, i.e. this maps an alias to a specific instance of an attribute.

    // A direct alias ("foo_str") for the string attribute "foo".
    #foo_str = "foo"

    * Kind aliases generates unique names for all instances of a given attribute kind. The generated aliases are of the form: `alias[0-9]+`.

    // A kind alias ("strattr") for all string attributes could generate.
    #strattr0 = "foo"
    #strattr1 = "bar"
    ...
    #strattrN = "baz"

--

PiperOrigin-RevId: 246851916
parent 3df7a802
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment