Commit 76c300c
authored
[BOLT][BTI] Fix assertions checking getNumOperands (#174600)
Several BTI-related functions are checking that a call MCInst has one
non-annotation operand.
This patch changes these checks to use MCPlus::getNumPrimeOperands,
instead of getNumOperands.
Testing:
added annotations to existing gtests to serve as regression
tests. These now also explicitly check getNumOperands and getNumPrimeOperands
usage on the annotated MCInsts.1 parent ad2c2b2 commit 76c300c
3 files changed
Lines changed: 21 additions & 6 deletions
File tree
- bolt
- lib
- Passes
- Target/AArch64
- unittests/Core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2788 | 2788 | | |
2789 | 2789 | | |
2790 | 2790 | | |
2791 | | - | |
2792 | | - | |
2793 | | - | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
2794 | 2795 | | |
2795 | 2796 | | |
2796 | 2797 | | |
| |||
2818 | 2819 | | |
2819 | 2820 | | |
2820 | 2821 | | |
2821 | | - | |
| 2822 | + | |
2822 | 2823 | | |
2823 | 2824 | | |
2824 | 2825 | | |
| |||
2856 | 2857 | | |
2857 | 2858 | | |
2858 | 2859 | | |
2859 | | - | |
| 2860 | + | |
2860 | 2861 | | |
2861 | 2862 | | |
2862 | 2863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| |||
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
209 | 220 | | |
210 | 221 | | |
211 | 222 | | |
| |||
223 | 234 | | |
224 | 235 | | |
225 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
226 | 240 | | |
227 | 241 | | |
228 | 242 | | |
| |||
0 commit comments