Commit 9fa77c1
authored
[BOLT][Linker][NFC] Remove lookupSymbol() in favor of lookupSymbolInfo() (#128070)
Sometimes we need to know the size of a symbol besides its address, so
maybe we can start using the existing `BOLTLinker::lookupSymbolInfo()`
(that returns symbol address and size) and remove
`BOLTLinker::lookupSymbol()` (that only returns symbol address). And for
both we need to check return value as it is wrapped in `std::optional<>`,
which makes the difference even smaller.1 parent 3c46deb commit 9fa77c1
File tree
6 files changed
+33
-31
lines changed- bolt
- include/bolt/Core
- lib
- Core
- Rewrite
- RuntimeLibs
6 files changed
+33
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4259 | 4259 | | |
4260 | 4260 | | |
4261 | 4261 | | |
4262 | | - | |
4263 | | - | |
4264 | | - | |
4265 | | - | |
| 4262 | + | |
| 4263 | + | |
| 4264 | + | |
| 4265 | + | |
4266 | 4266 | | |
4267 | 4267 | | |
4268 | 4268 | | |
4269 | 4269 | | |
4270 | 4270 | | |
4271 | 4271 | | |
4272 | 4272 | | |
4273 | | - | |
4274 | | - | |
| 4273 | + | |
| 4274 | + | |
4275 | 4275 | | |
4276 | | - | |
| 4276 | + | |
4277 | 4277 | | |
4278 | 4278 | | |
4279 | 4279 | | |
| |||
4298 | 4298 | | |
4299 | 4299 | | |
4300 | 4300 | | |
4301 | | - | |
| 4301 | + | |
4302 | 4302 | | |
4303 | | - | |
4304 | | - | |
| 4303 | + | |
| 4304 | + | |
4305 | 4305 | | |
4306 | 4306 | | |
4307 | 4307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5907 | 5907 | | |
5908 | 5908 | | |
5909 | 5909 | | |
5910 | | - | |
| 5910 | + | |
5911 | 5911 | | |
5912 | | - | |
| 5912 | + | |
5913 | 5913 | | |
5914 | 5914 | | |
5915 | 5915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | | - | |
214 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| 224 | + | |
| 225 | + | |
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
223 | 233 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
| |||
0 commit comments