mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[DWARFYAML] Use writeDWARFOffset() to write the prologue_length field. NFC.
Use writeDWARFOffset() to simplify the logic. NFC.
This commit is contained in:
parent
add1ee3a12
commit
5244300ee7
@ -452,10 +452,8 @@ Error DWARFYAML::emitDebugLine(raw_ostream &OS, const DWARFYAML::Data &DI) {
|
||||
for (const auto &LineTable : DI.DebugLines) {
|
||||
writeInitialLength(LineTable.Format, LineTable.Length, OS,
|
||||
DI.IsLittleEndian);
|
||||
uint64_t SizeOfPrologueLength = LineTable.Format == dwarf::DWARF64 ? 8 : 4;
|
||||
writeInteger((uint16_t)LineTable.Version, OS, DI.IsLittleEndian);
|
||||
cantFail(writeVariableSizedInteger(
|
||||
LineTable.PrologueLength, SizeOfPrologueLength, OS, DI.IsLittleEndian));
|
||||
writeDWARFOffset(LineTable.PrologueLength, LineTable.Format, OS, DI.IsLittleEndian);
|
||||
writeInteger((uint8_t)LineTable.MinInstLength, OS, DI.IsLittleEndian);
|
||||
if (LineTable.Version >= 4)
|
||||
writeInteger((uint8_t)LineTable.MaxOpsPerInst, OS, DI.IsLittleEndian);
|
||||
|
Loading…
x
Reference in New Issue
Block a user