================
@@ -50,21 +50,34 @@ def CIR_IntType : CIR_Type<"Int", "int", [
fundamental integer types. Said types are: `signed char`, `short`, `int`,
`long`, `long long`, and their unsigned variations.
}];
- let parameters = (ins "unsigned":$width, "bool":$isSigned);
+ let parameters = (ins "unsigned":$width, "bool":$isSigned,
+ DefaultValuedParameter<"bool", "false">:$bitInt);
+ let builders = [
+ TypeBuilder<(ins "unsigned":$width, "bool":$isSigned), [{
+ return $_get($_ctxt, width, isSigned, /*bitInt=*/false);
+ }]>,
+ ];
----------------
andykaylor wrote:
```suggestion
let parameters = (ins "unsigned":$width, "bool":$is_signed,
DefaultValuedParameter<"bool", "false">:$is_bit_int);
let builders = [
TypeBuilder<(ins "unsigned":$width, "bool":$is_signed), [{
return $_get($_ctxt, width, is_signed, /*is_bit_int=*/false);
}]>,
];
```
I'm suggesting a few things here. First, we've been inconsistent about it, but
we're trying to standardize on snake_case in the definition files. Second, I'd
prefer to see and `is_` prefix on 'bitInt`. Third, I'm suggesting `is_bit_int`
rather than `is_bitint` or `is_bitInt`, but I'm a bit ambivalent about this
last suggestion.
BTW, the snake_case gets translated to camelCase when things are generated from
it, so you'd need to call `getIsBitInt()` to access this.
https://github.com/llvm/llvm-project/pull/188113
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits