Commit 62860e7
committed
[llvm] Use *Map::try_emplace (NFC)
- try_emplace(Key) is shorter than insert({Key, nullptr}).
- try_emplace performs value initialization without value parameters.
- We overwrite values on successful insertion anyway.
While we are at it, this patch simplifies the code with structured
binding.1 parent e51ea1c commit 62860e7
File tree
2 files changed
+6
-7
lines changed- llvm
- include/llvm/ADT
- lib/MC
2 files changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
223 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
738 | | - | |
739 | | - | |
| 737 | + | |
| 738 | + | |
740 | 739 | | |
741 | 740 | | |
742 | 741 | | |
| |||
0 commit comments