Skip to content

Commit a6ccd19

Browse files
author
Greg Clayton
committed
Fix code to deal with recent LLVM changes.
https://reviews.llvm.org/D26526 llvm-svn: 286598
1 parent 82f12b1 commit a6ccd19

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,10 +877,13 @@ readCompUnit(const NormalizedFile &normalizedFile,
877877
// FIXME: Cribbed from llvm-dwp -- should share "lightweight CU DIE
878878
// inspection" code if possible.
879879
uint32_t offset = 0;
880+
llvm::dwarf::DwarfFormat Format = llvm::dwarf::DwarfFormat::DWARF32;
880881
auto infoData = dataExtractorFromSection(normalizedFile, info);
881882
uint32_t length = infoData.getU32(&offset);
882-
if (length == 0xffffffff)
883+
if (length == 0xffffffff) {
884+
Format = llvm::dwarf::DwarfFormat::DWARF64;
883885
infoData.getU64(&offset);
886+
}
884887
else if (length > 0xffffff00)
885888
return llvm::make_error<GenericError>("Malformed DWARF in " + path);
886889

@@ -927,7 +930,7 @@ readCompUnit(const NormalizedFile &normalizedFile,
927930
}
928931
default:
929932
llvm::DWARFFormValue::skipValue(form, infoData, &offset, version,
930-
addrSize);
933+
addrSize, Format);
931934
}
932935
}
933936
return tu;

0 commit comments

Comments
 (0)