Lines Matching +full:unit +full:- +full:address

1 //===- DwarfStreamer.cpp --------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
38 if (Error Err = Streamer->init(TheTriple, "__DWARF"))
58 MRI.reset(TheTarget->createMCRegInfo(TripleName));
67 MAI.reset(TheTarget->createMCAsmInfo(*MRI, TripleName, MCOptions));
72 MSTI.reset(TheTarget->createMCSubtargetInfo(TripleName, "", ""));
80 MOFI.reset(TheTarget->createMCObjectFileInfo(*MC, /*PIC=*/false, false));
81 MC->setObjectFileInfo(MOFI.get());
83 MAB = TheTarget->createMCAsmBackend(*MSTI, *MRI, MCOptions);
89 MII.reset(TheTarget->createMCInstrInfo());
95 MCE = TheTarget->createMCCodeEmitter(*MII, *MC);
103 MIP = TheTarget->createMCInstPrinter(TheTriple, MAI->getAssemblerDialect(),
105 MS = TheTarget->createAsmStreamer(
112 MS = TheTarget->createMCObjectStreamer(
114 MAB->createObjectWriter(OutFile), std::unique_ptr<MCCodeEmitter>(MCE),
126 TM.reset(TheTarget->createTargetMachine(TripleName, "", "", TargetOptions(),
133 Asm.reset(TheTarget->createAsmPrinter(*TM, std::unique_ptr<MCStreamer>(MS)));
138 Asm->setDwarfUsesRelocationsAcrossSections(false);
153 void DwarfStreamer::finish() { MS->finish(); }
156 MS->switchSection(MOFI->getDwarfInfoSection());
157 MC->setDwarfVersion(DwarfVersion);
160 /// Emit the compilation unit header for \p Unit in the debug_info section.
163 /// uint32_t Unit length (omitting this field)
166 /// uint8_t Address size
170 /// uint32_t Unit length (omitting this field)
172 /// uint8_t Unit type
173 /// uint8_t Address size
176 void DwarfStreamer::emitCompileUnitHeader(CompileUnit &Unit,
180 /// The start of the unit within its section.
181 Unit.setLabelBegin(Asm->createTempSymbol("cu_begin"));
182 Asm->OutStreamer->emitLabel(Unit.getLabelBegin());
187 Asm->emitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset() - 4);
188 Asm->emitInt16(DwarfVersion);
191 Asm->emitInt8(dwarf::DW_UT_compile);
192 Asm->emitInt8(Unit.getOrigUnit().getAddressByteSize());
195 Asm->emitInt32(0);
200 Asm->emitInt32(0);
201 Asm->emitInt8(Unit.getOrigUnit().getAddressByteSize());
206 EmittedUnits.push_back({Unit.getUniqueID(), Unit.getLabelBegin()});
214 MS->switchSection(MOFI->getDwarfAbbrevSection());
215 MC->setDwarfVersion(DwarfVersion);
216 Asm->emitDwarfAbbrevs(Abbrevs);
221 MS->switchSection(MOFI->getDwarfInfoSection());
222 Asm->emitDwarfDIE(Die);
233 MS->switchSection(Section);
235 MS->emitBytes(SecData);
242 return MC->getObjectFileInfo()->getDwarfInfoSection();
244 return MC->getObjectFileInfo()->getDwarfLineSection();
246 return MC->getObjectFileInfo()->getDwarfFrameSection();
248 return MC->getObjectFileInfo()->getDwarfRangesSection();
250 return MC->getObjectFileInfo()->getDwarfRnglistsSection();
252 return MC->getObjectFileInfo()->getDwarfLocSection();
254 return MC->getObjectFileInfo()->getDwarfLoclistsSection();
256 return MC->getObjectFileInfo()->getDwarfARangesSection();
258 return MC->getObjectFileInfo()->getDwarfAbbrevSection();
260 return MC->getObjectFileInfo()->getDwarfMacinfoSection();
262 return MC->getObjectFileInfo()->getDwarfMacroSection();
264 return MC->getObjectFileInfo()->getDwarfAddrSection();
266 return MC->getObjectFileInfo()->getDwarfStrSection();
268 return MC->getObjectFileInfo()->getDwarfLineStrSection();
270 return MC->getObjectFileInfo()->getDwarfStrOffSection();
272 return MC->getObjectFileInfo()->getDwarfPubNamesSection();
274 return MC->getObjectFileInfo()->getDwarfPubTypesSection();
276 return MC->getObjectFileInfo()->getDwarfDebugNamesSection();
278 return MC->getObjectFileInfo()->getDwarfAccelNamesSection();
280 return MC->getObjectFileInfo()->getDwarfAccelNamespaceSection();
282 return MC->getObjectFileInfo()->getDwarfAccelObjCSection();
284 return MC->getObjectFileInfo()->getDwarfAccelTypesSection();
295 Asm->OutStreamer->switchSection(MOFI->getDwarfStrSection());
299 Asm->OutStreamer->emitBytes(Entry.getString());
301 Asm->emitInt8(0);
313 Asm->OutStreamer->switchSection(MOFI->getDwarfStrOffSection());
315 MCSymbol *BeginLabel = Asm->createTempSymbol("Bdebugstroff");
316 MCSymbol *EndLabel = Asm->createTempSymbol("Edebugstroff");
319 Asm->emitLabelDifference(EndLabel, BeginLabel, sizeof(uint32_t));
320 Asm->OutStreamer->emitLabel(BeginLabel);
324 MS->emitInt16(5);
328 MS->emitInt16(0);
332 Asm->OutStreamer->emitInt32(Off);
335 Asm->OutStreamer->emitLabel(EndLabel);
340 Asm->OutStreamer->switchSection(MOFI->getDwarfLineStrSection());
344 Asm->OutStreamer->emitBytes(Entry.getString());
346 Asm->emitInt8(0);
364 Asm->OutStreamer->switchSection(MOFI->getDwarfDebugNamesSection());
366 (uint64_t)UniqueIdToCuMap.size() - 1);
367 /// llvm-dwarfutil doesn't support type units + .debug_names right now.
373 -> std::optional<DWARF5AccelTable::UnitIndexAndEncoding> {
383 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelNamespaceSection());
384 auto *SectionBegin = Asm->createTempSymbol("namespac_begin");
385 Asm->OutStreamer->emitLabel(SectionBegin);
391 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelNamesSection());
392 auto *SectionBegin = Asm->createTempSymbol("names_begin");
393 Asm->OutStreamer->emitLabel(SectionBegin);
399 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelObjCSection());
400 auto *SectionBegin = Asm->createTempSymbol("objc_begin");
401 Asm->OutStreamer->emitLabel(SectionBegin);
407 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelTypesSection());
408 auto *SectionBegin = Asm->createTempSymbol("types_begin");
409 Asm->OutStreamer->emitLabel(SectionBegin);
415 MCSection *SwiftASTSection = MOFI->getDwarfSwiftASTSection();
416 SwiftASTSection->setAlignment(Align(32));
417 MS->switchSection(SwiftASTSection);
418 MS->emitBytes(Buffer);
425 MOFI->getSwift5ReflectionSection(ReflSectionKind);
428 ReflectionSection->setAlignment(Align(Alignment));
429 MS->switchSection(ReflectionSection);
430 MS->emitBytes(Buffer);
434 const CompileUnit &Unit, const AddressRanges &LinkedRanges) {
435 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
438 MS->switchSection(MC->getObjectFileInfo()->getDwarfARangesSection());
441 MCSymbol *BeginLabel = Asm->createTempSymbol("Barange");
442 MCSymbol *EndLabel = Asm->createTempSymbol("Earange");
454 Asm->emitLabelDifference(EndLabel, BeginLabel, 4); // Arange length
455 Asm->OutStreamer->emitLabel(BeginLabel);
456 Asm->emitInt16(dwarf::DW_ARANGES_VERSION); // Version number
457 Asm->emitInt32(Unit.getStartOffset()); // Corresponding unit's offset
458 Asm->emitInt8(AddressSize); // Address size
459 Asm->emitInt8(0); // Segment size
461 Asm->OutStreamer->emitFill(Padding, 0x0);
465 MS->emitIntValue(Range.start(), AddressSize);
466 MS->emitIntValue(Range.end() - Range.start(), AddressSize);
470 Asm->OutStreamer->emitIntValue(0, AddressSize);
471 Asm->OutStreamer->emitIntValue(0, AddressSize);
472 Asm->OutStreamer->emitLabel(EndLabel);
476 const CompileUnit &Unit, const AddressRanges &LinkedRanges,
481 MS->switchSection(MC->getObjectFileInfo()->getDwarfRangesSection());
482 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
486 if (std::optional<uint64_t> LowPC = Unit.getLowPc())
490 MS->emitIntValue(Range.start() - BaseAddress, AddressSize);
491 MS->emitIntValue(Range.end() - BaseAddress, AddressSize);
498 MS->emitIntValue(0, AddressSize);
499 MS->emitIntValue(0, AddressSize);
506 DwarfStreamer::emitDwarfDebugRangeListHeader(const CompileUnit &Unit) {
507 if (Unit.getOrigUnit().getVersion() < 5)
511 MS->switchSection(MC->getObjectFileInfo()->getDwarfRnglistsSection());
513 MCSymbol *BeginLabel = Asm->createTempSymbol("Brnglists");
514 MCSymbol *EndLabel = Asm->createTempSymbol("Ernglists");
515 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
518 Asm->emitLabelDifference(EndLabel, BeginLabel, sizeof(uint32_t));
519 Asm->OutStreamer->emitLabel(BeginLabel);
523 MS->emitInt16(5);
526 // Address size.
527 MS->emitInt8(AddressSize);
531 MS->emitInt8(0);
535 MS->emitInt32(0);
542 const CompileUnit &Unit, const AddressRanges &LinkedRanges,
544 if (Unit.getOrigUnit().getVersion() < 5) {
545 emitDwarfDebugRangesTableFragment(Unit, LinkedRanges, Patch);
549 emitDwarfDebugRngListsTableFragment(Unit, LinkedRanges, Patch, AddrPool);
552 void DwarfStreamer::emitDwarfDebugRangeListFooter(const CompileUnit &Unit,
554 if (Unit.getOrigUnit().getVersion() < 5)
558 MS->switchSection(MC->getObjectFileInfo()->getDwarfRnglistsSection());
561 Asm->OutStreamer->emitLabel(EndLabel);
565 const CompileUnit &Unit, const AddressRanges &LinkedRanges,
570 MS->switchSection(MC->getObjectFileInfo()->getDwarfRnglistsSection());
578 // Emit base address.
579 MS->emitInt8(dwarf::DW_RLE_base_addressx);
582 MS->emitULEB128IntValue(AddrPool.getValueIndex(*BaseAddress));
586 MS->emitInt8(dwarf::DW_RLE_offset_pair);
589 // Emit start offset relative to base address.
591 MS->emitULEB128IntValue(Range.start() - *BaseAddress);
593 // Emit end offset relative to base address.
594 RngListsSectionSize += MS->emitULEB128IntValue(Range.end() - *BaseAddress);
598 MS->emitInt8(dwarf::DW_RLE_end_of_list);
603 MCSymbol *DwarfStreamer::emitDwarfDebugLocListHeader(const CompileUnit &Unit) {
604 if (Unit.getOrigUnit().getVersion() < 5)
608 MS->switchSection(MC->getObjectFileInfo()->getDwarfLoclistsSection());
610 MCSymbol *BeginLabel = Asm->createTempSymbol("Bloclists");
611 MCSymbol *EndLabel = Asm->createTempSymbol("Eloclists");
612 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
615 Asm->emitLabelDifference(EndLabel, BeginLabel, sizeof(uint32_t));
616 Asm->OutStreamer->emitLabel(BeginLabel);
620 MS->emitInt16(5);
623 // Address size.
624 MS->emitInt8(AddressSize);
628 MS->emitInt8(0);
632 MS->emitInt32(0);
640 const CompileUnit &Unit,
643 if (Unit.getOrigUnit().getVersion() < 5) {
644 emitDwarfDebugLocTableFragment(Unit, LinkedLocationExpression, Patch);
648 emitDwarfDebugLocListsTableFragment(Unit, LinkedLocationExpression, Patch,
653 void DwarfStreamer::emitDwarfDebugLocListFooter(const CompileUnit &Unit,
655 if (Unit.getOrigUnit().getVersion() < 5)
659 MS->switchSection(MC->getObjectFileInfo()->getDwarfLoclistsSection());
662 Asm->OutStreamer->emitLabel(EndLabel);
667 const CompileUnit &Unit,
673 MS->switchSection(MC->getObjectFileInfo()->getDwarfLocSection());
674 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
678 if (std::optional<uint64_t> LowPC = Unit.getLowPc())
684 MS->emitIntValue(LocExpression.Range->LowPC - BaseAddress, AddressSize);
685 MS->emitIntValue(LocExpression.Range->HighPC - BaseAddress, AddressSize);
691 Asm->OutStreamer->emitIntValue(LocExpression.Expr.size(), 2);
692 Asm->OutStreamer->emitBytes(StringRef(
698 MS->emitIntValue(0, AddressSize);
699 MS->emitIntValue(0, AddressSize);
706 MCSymbol *DwarfStreamer::emitDwarfDebugAddrsHeader(const CompileUnit &Unit) {
709 MS->switchSection(MC->getObjectFileInfo()->getDwarfAddrSection());
711 MCSymbol *BeginLabel = Asm->createTempSymbol("Bdebugaddr");
712 MCSymbol *EndLabel = Asm->createTempSymbol("Edebugaddr");
713 unsigned AddrSize = Unit.getOrigUnit().getAddressByteSize();
716 Asm->emitLabelDifference(EndLabel, BeginLabel, sizeof(uint32_t));
717 Asm->OutStreamer->emitLabel(BeginLabel);
721 Asm->emitInt16(5);
724 // Emit address size.
725 Asm->emitInt8(AddrSize);
729 Asm->emitInt8(0);
738 Asm->OutStreamer->switchSection(MOFI->getDwarfAddrSection());
740 Asm->OutStreamer->emitIntValue(Addr, AddrSize);
746 void DwarfStreamer::emitDwarfDebugAddrsFooter(const CompileUnit &Unit,
750 MS->switchSection(MC->getObjectFileInfo()->getDwarfAddrSection());
753 Asm->OutStreamer->emitLabel(EndLabel);
758 const CompileUnit &Unit,
764 MS->switchSection(MC->getObjectFileInfo()->getDwarfLoclistsSection());
773 BaseAddress = LocExpression.Range->LowPC;
775 // Emit base address.
776 MS->emitInt8(dwarf::DW_LLE_base_addressx);
779 MS->emitULEB128IntValue(AddrPool.getValueIndex(*BaseAddress));
783 MS->emitInt8(dwarf::DW_LLE_offset_pair);
786 // Emit start offset relative to base address.
788 MS->emitULEB128IntValue(LocExpression.Range->LowPC - *BaseAddress);
790 // Emit end offset relative to base address.
792 MS->emitULEB128IntValue(LocExpression.Range->HighPC - *BaseAddress);
795 MS->emitInt8(dwarf::DW_LLE_default_location);
799 LocListsSectionSize += MS->emitULEB128IntValue(LocExpression.Expr.size());
800 Asm->OutStreamer->emitBytes(StringRef(
806 MS->emitInt8(dwarf::DW_LLE_end_of_list);
811 const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit,
814 MS->switchSection(MC->getObjectFileInfo()->getDwarfLineSection());
816 MCSymbol *LineStartSym = MC->createTempSymbol();
817 MCSymbol *LineEndSym = MC->createTempSymbol();
821 MS->emitInt32(dwarf::DW_LENGTH_DWARF64);
826 Asm->OutStreamer->emitLabel(LineStartSym);
833 Unit.getOrigUnit().getAddressByteSize());
839 MCSymbol *PrologueStartSym = MC->createTempSymbol();
840 MCSymbol *PrologueEndSym = MC->createTempSymbol();
843 MS->emitInt16(P.getVersion());
847 MS->emitInt8(P.getAddressSize());
851 MS->emitInt8(P.SegSelectorSize);
859 Asm->OutStreamer->emitLabel(PrologueStartSym);
861 Asm->OutStreamer->emitLabel(PrologueEndSym);
871 MS->emitInt8(0);
876 // A null-terminated string containing the full or relative path name of a
881 LineSectionSize += MS->emitULEB128IntValue(File.DirIdx);
882 // An unsigned LEB128 number representing the (implementation-defined) time
884 LineSectionSize += MS->emitULEB128IntValue(File.ModTime);
887 LineSectionSize += MS->emitULEB128IntValue(File.Length);
890 MS->emitInt8(0);
899 MS->emitInt8(0);
903 MS->emitInt8(1);
907 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_path);
909 MS->emitULEB128IntValue(P.IncludeDirectories[0].getForm());
913 LineSectionSize += MS->emitULEB128IntValue(P.IncludeDirectories.size());
923 MS->emitInt8(0);
927 MS->emitInt8(2 + (HasChecksums ? 1 : 0) + (HasInlineSources ? 1 : 0));
932 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_path);
933 LineSectionSize += MS->emitULEB128IntValue(StrForm);
935 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_directory_index);
936 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_FORM_data1);
939 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_MD5);
940 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_FORM_data16);
944 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_LLVM_source);
945 LineSectionSize += MS->emitULEB128IntValue(StrForm);
950 LineSectionSize += MS->emitULEB128IntValue(P.FileNames.size());
955 MS->emitInt8(File.DirIdx);
958 MS->emitBinaryData(
981 Asm->OutStreamer->emitBytes(Str.data());
982 Asm->emitInt8(0);
1004 MS->emitInt8(P.MinInstLength);
1008 MS->emitInt8(P.MaxOpsPerInst);
1012 MS->emitInt8(P.DefaultIsStmt);
1015 MS->emitInt8(P.LineBase);
1018 MS->emitInt8(P.LineRange);
1021 MS->emitInt8(P.OpcodeBase);
1026 MS->emitInt8(Length);
1051 // address in that case.
1054 MS->emitBytes(EncodingBuffer);
1056 MS->emitLabel(LineEndSym);
1067 uint64_t Address = -1ULL;
1073 if (Address == -1ULL) {
1074 MS->emitIntValue(dwarf::DW_LNS_extended_op, 1);
1075 MS->emitULEB128IntValue(AddressByteSize + 1);
1076 MS->emitIntValue(dwarf::DW_LNE_set_address, 1);
1077 MS->emitIntValue(Row.Address.Address, AddressByteSize);
1083 (Row.Address.Address - Address) / LineTable.Prologue.MinInstLength;
1093 MS->emitIntValue(dwarf::DW_LNS_set_file, 1);
1094 MS->emitULEB128IntValue(FileNum);
1099 MS->emitIntValue(dwarf::DW_LNS_set_column, 1);
1100 MS->emitULEB128IntValue(Column);
1104 MS->getContext().getDwarfVersion() >= 4) {
1107 MS->emitIntValue(dwarf::DW_LNS_extended_op, 1);
1108 MS->emitULEB128IntValue(Size + 1);
1109 MS->emitIntValue(dwarf::DW_LNE_set_discriminator, 1);
1110 MS->emitULEB128IntValue(Discriminator);
1118 MS->emitIntValue(dwarf::DW_LNS_set_isa, 1);
1119 MS->emitULEB128IntValue(Isa);
1124 MS->emitIntValue(dwarf::DW_LNS_negate_stmt, 1);
1128 MS->emitIntValue(dwarf::DW_LNS_set_basic_block, 1);
1133 MS->emitIntValue(dwarf::DW_LNS_set_prologue_end, 1);
1138 MS->emitIntValue(dwarf::DW_LNS_set_epilogue_begin, 1);
1142 int64_t LineDelta = int64_t(Row.Line) - LastLine;
1146 MS->emitBytes(EncodingBuffer);
1149 Address = Row.Address.Address;
1154 MS->emitIntValue(dwarf::DW_LNS_advance_line, 1);
1155 MS->emitSLEB128IntValue(LineDelta);
1159 MS->emitIntValue(dwarf::DW_LNS_advance_pc, 1);
1160 MS->emitULEB128IntValue(AddressDelta);
1165 MS->emitBytes(EncodingBuffer);
1168 Address = -1ULL;
1177 MS->emitBytes(EncodingBuffer);
1182 MS->emitLabel(LineEndSym);
1188 MS->emitIntValue(Offset, Size);
1196 Asm->emitLabelDifference(Hi, Lo, Size);
1201 /// Unit into \p Sec. The data is provided in \p Names.
1203 MCSection *Sec, StringRef SecName, const CompileUnit &Unit,
1209 Asm->OutStreamer->switchSection(Sec);
1210 MCSymbol *BeginLabel = Asm->createTempSymbol("pub" + SecName + "_begin");
1211 MCSymbol *EndLabel = Asm->createTempSymbol("pub" + SecName + "_end");
1214 // Emit the pubnames for this compilation unit.
1221 Asm->emitLabelDifference(EndLabel, BeginLabel, 4); // Length
1222 Asm->OutStreamer->emitLabel(BeginLabel);
1223 Asm->emitInt16(dwarf::DW_PUBNAMES_VERSION); // Version
1224 Asm->emitInt32(Unit.getStartOffset()); // Unit offset
1225 Asm->emitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset()); // Size
1228 Asm->emitInt32(Name.Die->getOffset());
1231 Asm->OutStreamer->emitBytes(Name.Name.getString());
1233 Asm->emitInt8(0);
1238 Asm->emitInt32(0); // End marker.
1239 Asm->OutStreamer->emitLabel(EndLabel);
1242 /// Emit .debug_pubnames for \p Unit.
1243 void DwarfStreamer::emitPubNamesForUnit(const CompileUnit &Unit) {
1244 emitPubSectionForUnit(MC->getObjectFileInfo()->getDwarfPubNamesSection(),
1245 "names", Unit, Unit.getPubnames());
1248 /// Emit .debug_pubtypes for \p Unit.
1249 void DwarfStreamer::emitPubTypesForUnit(const CompileUnit &Unit) {
1250 emitPubSectionForUnit(MC->getObjectFileInfo()->getDwarfPubTypesSection(),
1251 "types", Unit, Unit.getPubtypes());
1256 MS->switchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
1258 MS->emitBytes(CIEBytes);
1263 /// contains the FDE data without the length, CIE offset and address
1266 uint64_t Address, StringRef FDEBytes) {
1267 MS->switchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
1269 MS->emitIntValue(FDEBytes.size() + 4 + AddrSize, 4);
1270 MS->emitIntValue(CIEOffset, 4);
1271 MS->emitIntValue(Address, AddrSize);
1272 MS->emitBytes(FDEBytes);
1282 if (const DWARFDebugMacro *Table = Context->getDebugMacinfo()) {
1283 MS->switchSection(MC->getObjectFileInfo()->getDwarfMacinfoSection());
1288 if (const DWARFDebugMacro *Table = Context->getDebugMacro()) {
1289 MS->switchSection(MC->getObjectFileInfo()->getDwarfMacroSection());
1301 for (const DWARFDebugMacro::MacroList &List : MacroTable->MacroLists) {
1305 "couldn`t find compile unit for the macro table with offset = {0:x}",
1310 // Skip macro table if the unit was not cloned.
1311 DIE *OutputUnitDIE = UnitIt->second->getOutputUnitDIE();
1315 // Update macro attribute of cloned compile unit with the proper offset to
1318 for (auto &V : OutputUnitDIE->values()) {
1332 MS->emitIntValue(List.Header.Version, sizeof(List.Header.Version));
1347 // Get offset to the line table from the cloned compile unit.
1348 for (auto &V : OutputUnitDIE->values()) {
1362 MS->emitIntValue(Flags, sizeof(Flags));
1367 MS->emitIntValue(*StmtListOffset, List.Header.getOffsetByteSize());
1375 OutOffset += MS->emitULEB128IntValue(MacroEntry.Type);
1389 MS->emitIntValue(MacroType, 1);
1393 OutOffset += MS->emitULEB128IntValue(MacroEntry.ExtConstant);
1397 MS->emitBytes(String);
1398 MS->emitIntValue(0, 1);
1412 MS->emitIntValue(MacroType, 1);
1416 OutOffset += MS->emitULEB128IntValue(MacroEntry.Line);
1420 MS->emitBytes(String);
1421 MS->emitIntValue(0, 1);
1428 assert(UnitIt->second->getOrigUnit().getVersion() >= 5);
1455 MS->emitIntValue(MacroType, 1);
1459 OutOffset += MS->emitULEB128IntValue(MacroEntry.Line);
1464 MS->emitIntValue(EntryRef.getOffset(), List.Header.getOffsetByteSize());
1470 MS->emitIntValue(MacroType, 1);
1473 OutOffset += MS->emitULEB128IntValue(MacroEntry.Line);
1475 OutOffset += MS->emitULEB128IntValue(MacroEntry.File);
1479 MS->emitIntValue(MacroType, 1);