File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2990,6 +2990,9 @@ struct ArangeSpan {
2990
2990
// Emit a debug aranges section, containing a CU lookup for any
2991
2991
// address we can tie back to a CU.
2992
2992
void DwarfDebug::emitDebugARanges () {
2993
+ if (ArangeLabels.empty ())
2994
+ return ;
2995
+
2993
2996
// Provides a unique id per text section.
2994
2997
MapVector<MCSection *, SmallVector<SymbolCU, 8 >> SectionMap;
2995
2998
@@ -3012,8 +3015,7 @@ void DwarfDebug::emitDebugARanges() {
3012
3015
for (auto &I : SectionMap) {
3013
3016
MCSection *Section = I.first ;
3014
3017
SmallVector<SymbolCU, 8 > &List = I.second ;
3015
- if (List.size () < 1 )
3016
- continue ;
3018
+ assert (!List.empty ());
3017
3019
3018
3020
// If we have no section (e.g. common), just write out
3019
3021
// individual spans for each symbol.
Original file line number Diff line number Diff line change 1
- ; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-objdump -h - | FileCheck %s
1
+ ; RUN: %llc_dwarf %s -filetype=obj -generate-arange-section - o - | llvm-objdump -h - | FileCheck %s
2
2
; REQUIRES: object-emission
3
3
4
4
; CHECK-NOT: .debug_
You can’t perform that action at this time.
0 commit comments