-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Attributes] Support int attributes with zero value
This regularly comes up as a stumbling stone when adding int attributes: They currently need to be encoded in a way to avoids the zero value. This adds support for zero-value int attributes by a) making the ctor determine int/enum attribute based on attribute kind, not whether the value is non-zero and b) switching getRawIntAttr() to return an Optional, so that it's possible to distinguish a zero value from non-existence. Differential Revision: https://reviews.llvm.org/D135572
- Loading branch information
Showing
3 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters