Skip to content

Commit 784c95e

Browse files
WIP MCCAS, early exit if Section has no fragments
1 parent 54a5fbb commit 784c95e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/MCCAS/MCCASObjectV1.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,8 @@ Expected<SmallVector<char, 0>>
21502150
MCCASBuilder::mergeMCFragmentContents(const MCSection *Section,
21512151
bool IsDebugLineSection) {
21522152
SmallVector<char, 0> mergedData;
2153+
if (!Section->curFragList())
2154+
return mergedData;
21532155
for (const MCFragment &Fragment : *Section) {
21542156
if (Fragment.getKind() == MCFragment::FT_Dwarf)
21552157
if (IsDebugLineSection)

0 commit comments

Comments
 (0)