Commit 4bb4ad4
authored
[AArch64][PAC] Use enum to describe LR signing condition (NFC) (#168548)
Express the condition of signing the return address in a function using
an `enum class` instead of a pair of `bool`s. Define `enum class
SignReturnAddress` with the values corresponding to the three possible
modes that can be requested via "sign-return-address" function
attribute.
Previously, there were two overloads of `shouldSignReturnAddress`
accepting either `const MachineFunction &` or `bool` argument. Due to
pointer-to-bool conversion, when `shouldSignReturnAddress` was
incorrectly called with `const MachineFunction *` argument, the latter
overload was used instead of reporting a compile-time error.1 parent e085082 commit 4bb4ad4
File tree
4 files changed
+52
-38
lines changed- llvm/lib/Target/AArch64
4 files changed
+52
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
976 | | - | |
977 | | - | |
| 976 | + | |
978 | 977 | | |
979 | 978 | | |
980 | 979 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9796 | 9796 | | |
9797 | 9797 | | |
9798 | 9798 | | |
9799 | | - | |
9800 | | - | |
| 9799 | + | |
| 9800 | + | |
9801 | 9801 | | |
9802 | 9802 | | |
9803 | 9803 | | |
| |||
9888 | 9888 | | |
9889 | 9889 | | |
9890 | 9890 | | |
9891 | | - | |
9892 | | - | |
9893 | | - | |
9894 | | - | |
| 9891 | + | |
| 9892 | + | |
| 9893 | + | |
| 9894 | + | |
| 9895 | + | |
9895 | 9896 | | |
9896 | 9897 | | |
9897 | 9898 | | |
| |||
10695 | 10696 | | |
10696 | 10697 | | |
10697 | 10698 | | |
10698 | | - | |
| 10699 | + | |
| 10700 | + | |
| 10701 | + | |
10699 | 10702 | | |
10700 | 10703 | | |
10701 | 10704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
| |||
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
119 | | - | |
| 117 | + | |
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
| |||
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | 170 | | |
181 | 171 | | |
182 | 172 | | |
183 | 173 | | |
184 | 174 | | |
185 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | | - | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 182 | + | |
| 183 | + | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| |||
591 | 595 | | |
592 | 596 | | |
593 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
594 | 601 | | |
595 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
596 | 606 | | |
597 | 607 | | |
598 | 608 | | |
| |||
0 commit comments