[PATCH] D108261: [DebugInfo] Fix end_sequence of debug_line in LTO Object
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 14 13:34:59 PST 2021
dblaikie added inline comments.
================
Comment at: llvm/lib/MC/MCDwarf.cpp:148
+ // which may directly use .loc/.file directives.
+ if (MCLineDivisions.count(Sec)) {
+ auto &Entries = MCLineDivisions[Sec];
----------------
find is preferred over count - so that the result can be used rather than a duplicate lookup:
```
auto I = MCLineDivisions.find(Sec);
if (I != MCLineDivisions.end()) {
auto &Entries = I->second;
...
}
```
Though I'm still curious to better understand under what conditions this is needed.
================
Comment at: llvm/test/DebugInfo/XCOFF/empty.ll:230
; ASM32-NEXT: .byte 1
-; ASM32-NEXT: .byte 0 # Set address to L..sec_end0
+; ASM32-NEXT: .byte 0 # Set address to L..func_end0
; ASM32-NEXT: .byte 5
----------------
Hmm, what aspect of the change caused these labels to change name?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108261/new/
https://reviews.llvm.org/D108261
More information about the llvm-commits
mailing list