[lld] r286598 - Fix code to deal with recent LLVM changes.
Greg Clayton via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 08:23:48 PST 2016
Author: gclayton
Date: Fri Nov 11 10:23:47 2016
New Revision: 286598
URL: http://llvm.org/viewvc/llvm-project?rev=286598&view=rev
Log:
Fix code to deal with recent LLVM changes.
https://reviews.llvm.org/D26526
Modified:
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp?rev=286598&r1=286597&r2=286598&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp Fri Nov 11 10:23:47 2016
@@ -877,10 +877,13 @@ readCompUnit(const NormalizedFile &norma
// FIXME: Cribbed from llvm-dwp -- should share "lightweight CU DIE
// inspection" code if possible.
uint32_t offset = 0;
+ llvm::dwarf::DwarfFormat Format = llvm::dwarf::DwarfFormat::DWARF32;
auto infoData = dataExtractorFromSection(normalizedFile, info);
uint32_t length = infoData.getU32(&offset);
- if (length == 0xffffffff)
+ if (length == 0xffffffff) {
+ Format = llvm::dwarf::DwarfFormat::DWARF64;
infoData.getU64(&offset);
+ }
else if (length > 0xffffff00)
return llvm::make_error<GenericError>("Malformed DWARF in " + path);
@@ -927,7 +930,7 @@ readCompUnit(const NormalizedFile &norma
}
default:
llvm::DWARFFormValue::skipValue(form, infoData, &offset, version,
- addrSize);
+ addrSize, Format);
}
}
return tu;
More information about the llvm-commits
mailing list