Skip to content

Commit 0f6a9bc

Browse files
Merge pull request swiftlang#7682 from rastogishubham/FixMCCAS
Fix crash in clang/test/CAS/cas-backend.c
2 parents b2e3fed + 7773cc5 commit 0f6a9bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/MCCAS/MCCASObjectV1.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,8 +1995,10 @@ Error InMemoryCASDWARFObject::partitionCUData(ArrayRef<char> DebugInfoData,
19951995
uint64_t OffsetPtr = 0;
19961996
DWARFUnitHeader Header;
19971997
DWARFSection Section = {toStringRef(DebugInfoData), 0 /*Address*/};
1998-
Header.extract(*Ctx, DWARFDataExtractor(*this, Section, isLittleEndian(), 8),
1999-
&OffsetPtr, DWARFSectionKind::DW_SECT_INFO);
1998+
if (Error E = Header.extract(
1999+
*Ctx, DWARFDataExtractor(*this, Section, isLittleEndian(), 8),
2000+
&OffsetPtr, DWARFSectionKind::DW_SECT_INFO))
2001+
return E;
20002002

20012003
DWARFUnitVector UV;
20022004
DWARFCompileUnit DCU(*Ctx, Section, Header, &Abbrev, &getRangesSection(),

0 commit comments

Comments
 (0)