Commit 0eaccba
authored
## Description
Unfortunately, this became a little bit more cumbersome to figure out
than expected.
The automatically generated getter for the parameter "body" was hiding
one of the trait interface methods. These methods do have a slightly
different signature (`getBody()` returns a `Block*` and
`getBodyRegion()` accepts an index parameter) which can lead to
confusion and an inconsistent API.
An alternative to this proposal could be simply the name "region"
because `getRegion()` of the `OneRegion` trait has the same signature
and thus the override would probably not be noticed. However, there
would be two identical implementations for this method and this could
make debugging harder.
The downside to the current solution is that there are now three
functions to access the region: `getRegion()` (by `OneRegion`),
`getBodyRegion()` (by `SingleBlock`) and `getCtrlBodyRegion()` (by
getter).
## Checklist:
<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->
- [ ] The pull request only contains commits that are focused and
relevant to this change.
- [ ] I have added appropriate tests that cover the new/changed
functionality.
- [ ] I have updated the documentation to reflect these changes.
- [ ] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [ ] I have added migration instructions to the upgrade guide (if
needed).
- [ ] The changes follow the project's style guidelines and introduce no
new warnings.
- [ ] The changes are fully tested and pass the CI checks.
- [ ] I have reviewed my own code changes.
1 parent 187e6a2 commit 0eaccba
File tree
7 files changed
+15
-13
lines changed- mlir
- include/mlir/Dialect
- QCO/IR
- QC/IR
- lib
- Conversion
- QCOToQC
- QCToQCO
- Dialect
- QCO/IR/Modifiers
- QC/IR/Modifiers
7 files changed
+15
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
952 | | - | |
| 951 | + | |
| 952 | + | |
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
| 1070 | + | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | | - | |
| 1073 | + | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
781 | | - | |
| 780 | + | |
| 781 | + | |
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
1130 | | - | |
1131 | | - | |
| 1130 | + | |
| 1131 | + | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
0 commit comments