36 std::unique_ptr<DwarfStreamer>
Streamer =
37 std::make_unique<DwarfStreamer>(FileType, OutFile,
Warning);
39 return std::move(Err);
47 std::string TripleName;
61 "no register info for target %s",
65 MCOptions.AsmVerbose =
true;
70 "no asm info for target %s", TripleName.c_str());
75 "no subtarget info for target %s",
78 MC.reset(
new MCContext(TheTriple, *MAI, *MRI, *MSTI,
nullptr,
true,
79 Swift5ReflectionSegmentName));
81 MC->setObjectFileInfo(MOFI.get());
86 "no asm backend for target %s",
92 "no instr info info for target %s",
98 "no code emitter for target %s",
101 switch (OutFileType) {
104 TheTriple, MAI->getAssemblerDialect(), *MAI, *MII, *MRI));
106 *MC, std::make_unique<formatted_raw_ostream>(OutFile), std::move(MIP),
107 std::unique_ptr<MCCodeEmitter>(MCE),
108 std::unique_ptr<MCAsmBackend>(MAB));
113 TheTriple, *MC, std::unique_ptr<MCAsmBackend>(MAB),
114 MAB->createObjectWriter(OutFile), std::unique_ptr<MCCodeEmitter>(MCE),
122 "no object streamer for target %s",
130 "no target machine for target %s",
133 Asm.reset(TheTarget->
createAsmPrinter(*TM, std::unique_ptr<MCStreamer>(MS)));
136 "no asm printer for target %s",
138 Asm->setDwarfUsesRelocationsAcrossSections(
false);
140 RangesSectionSize = 0;
141 RngListsSectionSize = 0;
143 LocListsSectionSize = 0;
145 FrameSectionSize = 0;
146 DebugInfoSectionSize = 0;
147 MacInfoSectionSize = 0;
148 MacroSectionSize = 0;
156 MS->switchSection(MOFI->getDwarfInfoSection());
157 MC->setDwarfVersion(DwarfVersion);
177 unsigned DwarfVersion) {
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);
190 if (DwarfVersion >= 5) {
191 dwarf::Tag RootTag = Unit.getOutputUnitDIE()->getTag();
192 Asm->emitInt8(RootTag == dwarf::DW_TAG_partial_unit ? dwarf::DW_UT_partial
193 : dwarf::DW_UT_compile);
194 Asm->emitInt8(Unit.getOrigUnit().getAddressByteSize());
198 DebugInfoSectionSize += 12;
203 Asm->emitInt8(Unit.getOrigUnit().getAddressByteSize());
204 DebugInfoSectionSize += 11;
208 EmittedUnits.push_back({Unit.getUniqueID(), Unit.getLabelBegin()});
214 const std::vector<std::unique_ptr<DIEAbbrev>> &Abbrevs,
215 unsigned DwarfVersion) {
216 MS->switchSection(MOFI->getDwarfAbbrevSection());
217 MC->setDwarfVersion(DwarfVersion);
218 Asm->emitDwarfAbbrevs(Abbrevs);
223 MS->switchSection(MOFI->getDwarfInfoSection());
224 Asm->emitDwarfDIE(Die);
225 DebugInfoSectionSize += Die.
getSize();
234 if (
MCSection *Section = getMCSection(SecKind)) {
235 MS->switchSection(Section);
237 MS->emitBytes(SecData);
244 return MC->getObjectFileInfo()->getDwarfInfoSection();
246 return MC->getObjectFileInfo()->getDwarfLineSection();
248 return MC->getObjectFileInfo()->getDwarfFrameSection();
250 return MC->getObjectFileInfo()->getDwarfRangesSection();
252 return MC->getObjectFileInfo()->getDwarfRnglistsSection();
254 return MC->getObjectFileInfo()->getDwarfLocSection();
256 return MC->getObjectFileInfo()->getDwarfLoclistsSection();
258 return MC->getObjectFileInfo()->getDwarfARangesSection();
260 return MC->getObjectFileInfo()->getDwarfAbbrevSection();
262 return MC->getObjectFileInfo()->getDwarfMacinfoSection();
264 return MC->getObjectFileInfo()->getDwarfMacroSection();
266 return MC->getObjectFileInfo()->getDwarfAddrSection();
268 return MC->getObjectFileInfo()->getDwarfStrSection();
270 return MC->getObjectFileInfo()->getDwarfLineStrSection();
272 return MC->getObjectFileInfo()->getDwarfStrOffSection();
274 return MC->getObjectFileInfo()->getDwarfPubNamesSection();
276 return MC->getObjectFileInfo()->getDwarfPubTypesSection();
278 return MC->getObjectFileInfo()->getDwarfDebugNamesSection();
280 return MC->getObjectFileInfo()->getDwarfAccelNamesSection();
282 return MC->getObjectFileInfo()->getDwarfAccelNamespaceSection();
284 return MC->getObjectFileInfo()->getDwarfAccelObjCSection();
286 return MC->getObjectFileInfo()->getDwarfAccelTypesSection();
297 Asm->OutStreamer->switchSection(MOFI->getDwarfStrSection());
299 for (
auto Entry : Entries) {
301 Asm->OutStreamer->emitBytes(Entry.getString());
312 if (TargetDWARFVersion < 5 || StringOffsets.
empty())
315 Asm->OutStreamer->switchSection(MOFI->getDwarfStrOffSection());
317 MCSymbol *BeginLabel = Asm->createTempSymbol(
"Bdebugstroff");
318 MCSymbol *EndLabel = Asm->createTempSymbol(
"Edebugstroff");
321 Asm->emitLabelDifference(EndLabel, BeginLabel,
sizeof(
uint32_t));
322 Asm->OutStreamer->emitLabel(BeginLabel);
323 StrOffsetSectionSize +=
sizeof(
uint32_t);
327 StrOffsetSectionSize +=
sizeof(uint16_t);
331 StrOffsetSectionSize +=
sizeof(uint16_t);
333 for (
auto Off : StringOffsets) {
334 Asm->OutStreamer->emitInt32(
Off);
335 StrOffsetSectionSize +=
sizeof(
uint32_t);
337 Asm->OutStreamer->emitLabel(EndLabel);
342 Asm->OutStreamer->switchSection(MOFI->getDwarfLineStrSection());
344 for (
auto Entry : Entries) {
346 Asm->OutStreamer->emitBytes(Entry.getString());
353 if (EmittedUnits.empty())
357 std::vector<std::variant<MCSymbol *, uint64_t>> CompUnits;
360 for (
auto &
CU : EmittedUnits) {
361 CompUnits.push_back(
CU.LabelBegin);
363 UniqueIdToCuMap[
CU.ID] = Id++;
366 Asm->OutStreamer->switchSection(MOFI->getDwarfDebugNamesSection());
368 (uint64_t)UniqueIdToCuMap.
size() - 1);
373 Asm.get(),
Table, CompUnits,
375 -> std::optional<DWARF5AccelTable::UnitIndexAndEncoding> {
376 if (UniqueIdToCuMap.size() > 1)
377 return {{UniqueIdToCuMap[Entry.getUnitID()],
378 {dwarf::DW_IDX_compile_unit, Form}}};
385 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelNamespaceSection());
386 auto *SectionBegin = Asm->createTempSymbol(
"namespac_begin");
387 Asm->OutStreamer->emitLabel(SectionBegin);
393 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelNamesSection());
394 auto *SectionBegin = Asm->createTempSymbol(
"names_begin");
395 Asm->OutStreamer->emitLabel(SectionBegin);
401 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelObjCSection());
402 auto *SectionBegin = Asm->createTempSymbol(
"objc_begin");
403 Asm->OutStreamer->emitLabel(SectionBegin);
409 Asm->OutStreamer->switchSection(MOFI->getDwarfAccelTypesSection());
410 auto *SectionBegin = Asm->createTempSymbol(
"types_begin");
411 Asm->OutStreamer->emitLabel(SectionBegin);
417 MCSection *SwiftASTSection = MOFI->getDwarfSwiftASTSection();
419 MS->switchSection(SwiftASTSection);
420 MS->emitBytes(Buffer);
427 MOFI->getSwift5ReflectionSection(ReflSectionKind);
428 if (ReflectionSection ==
nullptr)
431 MS->switchSection(ReflectionSection);
432 MS->emitBytes(Buffer);
437 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
440 MS->switchSection(MC->getObjectFileInfo()->getDwarfARangesSection());
443 MCSymbol *BeginLabel = Asm->createTempSymbol(
"Barange");
444 MCSymbol *EndLabel = Asm->createTempSymbol(
"Earange");
446 unsigned HeaderSize =
453 unsigned TupleSize = AddressSize * 2;
456 Asm->emitLabelDifference(EndLabel, BeginLabel, 4);
457 Asm->OutStreamer->emitLabel(BeginLabel);
459 Asm->emitInt32(Unit.getStartOffset());
460 Asm->emitInt8(AddressSize);
463 Asm->OutStreamer->emitFill(Padding, 0x0);
467 MS->emitIntValue(
Range.start(), AddressSize);
468 MS->emitIntValue(
Range.end() -
Range.start(), AddressSize);
472 Asm->OutStreamer->emitIntValue(0, AddressSize);
473 Asm->OutStreamer->emitIntValue(0, AddressSize);
474 Asm->OutStreamer->emitLabel(EndLabel);
477Error DwarfStreamer::emitDwarfDebugRangesTableFragment(
481 RangesSectionSize, Unit.getOrigUnit().getFormParams(),
".debug_ranges");
483 return Offset.takeError();
487 MS->
switchSection(MC->getObjectFileInfo()->getDwarfRangesSection());
488 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
491 uint64_t BaseAddress = 0;
492 if (std::optional<uint64_t> LowPC = Unit.getLowPc())
493 BaseAddress = *LowPC;
499 RangesSectionSize += AddressSize;
500 RangesSectionSize += AddressSize;
507 RangesSectionSize += AddressSize;
508 RangesSectionSize += AddressSize;
514 if (Unit.getOrigUnit().getVersion() < 5)
518 MS->switchSection(MC->getObjectFileInfo()->getDwarfRnglistsSection());
520 MCSymbol *BeginLabel = Asm->createTempSymbol(
"Brnglists");
521 MCSymbol *EndLabel = Asm->createTempSymbol(
"Ernglists");
522 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
525 Asm->emitLabelDifference(EndLabel, BeginLabel,
sizeof(
uint32_t));
526 Asm->OutStreamer->emitLabel(BeginLabel);
527 RngListsSectionSize +=
sizeof(
uint32_t);
531 RngListsSectionSize +=
sizeof(uint16_t);
534 MS->emitInt8(AddressSize);
535 RngListsSectionSize++;
539 RngListsSectionSize++;
543 RngListsSectionSize +=
sizeof(
uint32_t);
551 if (Unit.getOrigUnit().getVersion() < 5) {
552 return emitDwarfDebugRangesTableFragment(Unit, LinkedRanges, Patch);
555 return emitDwarfDebugRngListsTableFragment(Unit, LinkedRanges, Patch,
561 if (Unit.getOrigUnit().getVersion() < 5)
565 MS->switchSection(MC->getObjectFileInfo()->getDwarfRnglistsSection());
567 if (EndLabel !=
nullptr)
568 Asm->OutStreamer->emitLabel(EndLabel);
571Error DwarfStreamer::emitDwarfDebugRngListsTableFragment(
575 clampSecOffset(RngListsSectionSize, Unit.getOrigUnit().getFormParams(),
578 return Offset.takeError();
582 MS->
switchSection(MC->getObjectFileInfo()->getDwarfRnglistsSection());
583 std::optional<uint64_t> BaseAddress;
588 BaseAddress =
Range.start();
591 MS->
emitInt8(dwarf::DW_RLE_base_addressx);
592 RngListsSectionSize += 1;
593 RngListsSectionSize +=
598 MS->
emitInt8(dwarf::DW_RLE_offset_pair);
599 RngListsSectionSize += 1;
602 RngListsSectionSize +=
610 MS->
emitInt8(dwarf::DW_RLE_end_of_list);
611 RngListsSectionSize += 1;
617 if (Unit.getOrigUnit().getVersion() < 5)
621 MS->switchSection(MC->getObjectFileInfo()->getDwarfLoclistsSection());
623 MCSymbol *BeginLabel = Asm->createTempSymbol(
"Bloclists");
624 MCSymbol *EndLabel = Asm->createTempSymbol(
"Eloclists");
625 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
628 Asm->emitLabelDifference(EndLabel, BeginLabel,
sizeof(
uint32_t));
629 Asm->OutStreamer->emitLabel(BeginLabel);
630 LocListsSectionSize +=
sizeof(
uint32_t);
634 LocListsSectionSize +=
sizeof(uint16_t);
637 MS->emitInt8(AddressSize);
638 LocListsSectionSize++;
642 LocListsSectionSize++;
646 LocListsSectionSize +=
sizeof(
uint32_t);
656 if (Unit.getOrigUnit().getVersion() < 5) {
657 return emitDwarfDebugLocTableFragment(Unit, LinkedLocationExpression,
661 return emitDwarfDebugLocListsTableFragment(Unit, LinkedLocationExpression,
668 if (Unit.getOrigUnit().getVersion() < 5)
672 MS->switchSection(MC->getObjectFileInfo()->getDwarfLoclistsSection());
674 if (EndLabel !=
nullptr)
675 Asm->OutStreamer->emitLabel(EndLabel);
679Error DwarfStreamer::emitDwarfDebugLocTableFragment(
684 LocSectionSize, Unit.getOrigUnit().getFormParams(),
".debug_loc");
686 return Offset.takeError();
690 MS->
switchSection(MC->getObjectFileInfo()->getDwarfLocSection());
691 unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
694 uint64_t BaseAddress = 0;
695 if (std::optional<uint64_t> LowPC = Unit.getLowPc())
696 BaseAddress = *LowPC;
699 LinkedLocationExpression) {
700 if (LocExpression.Range) {
701 MS->
emitIntValue(LocExpression.Range->LowPC - BaseAddress, AddressSize);
702 MS->
emitIntValue(LocExpression.Range->HighPC - BaseAddress, AddressSize);
704 LocSectionSize += AddressSize;
705 LocSectionSize += AddressSize;
708 Asm->OutStreamer->emitIntValue(LocExpression.Expr.size(), 2);
710 (
const char *)LocExpression.Expr.data(), LocExpression.Expr.size()));
711 LocSectionSize += LocExpression.Expr.size() + 2;
718 LocSectionSize += AddressSize;
719 LocSectionSize += AddressSize;
727 MS->switchSection(MC->getObjectFileInfo()->getDwarfAddrSection());
729 MCSymbol *BeginLabel = Asm->createTempSymbol(
"Bdebugaddr");
730 MCSymbol *EndLabel = Asm->createTempSymbol(
"Edebugaddr");
731 unsigned AddrSize = Unit.getOrigUnit().getAddressByteSize();
734 Asm->emitLabelDifference(EndLabel, BeginLabel,
sizeof(
uint32_t));
735 Asm->OutStreamer->emitLabel(BeginLabel);
736 AddrSectionSize +=
sizeof(
uint32_t);
740 AddrSectionSize += 2;
743 Asm->emitInt8(AddrSize);
744 AddrSectionSize += 1;
748 AddrSectionSize += 1;
756 Asm->OutStreamer->switchSection(MOFI->getDwarfAddrSection());
757 for (
auto Addr : Addrs) {
758 Asm->OutStreamer->emitIntValue(Addr, AddrSize);
759 AddrSectionSize += AddrSize;
768 MS->switchSection(MC->getObjectFileInfo()->getDwarfAddrSection());
770 if (EndLabel !=
nullptr)
771 Asm->OutStreamer->emitLabel(EndLabel);
775Error DwarfStreamer::emitDwarfDebugLocListsTableFragment(
780 clampSecOffset(LocListsSectionSize, Unit.getOrigUnit().getFormParams(),
783 return Offset.takeError();
787 MS->
switchSection(MC->getObjectFileInfo()->getDwarfLoclistsSection());
788 std::optional<uint64_t> BaseAddress;
791 LinkedLocationExpression) {
792 if (LocExpression.Range) {
796 BaseAddress = LocExpression.Range->LowPC;
799 MS->
emitInt8(dwarf::DW_LLE_base_addressx);
800 LocListsSectionSize += 1;
801 LocListsSectionSize +=
806 MS->
emitInt8(dwarf::DW_LLE_offset_pair);
807 LocListsSectionSize += 1;
810 LocListsSectionSize +=
814 LocListsSectionSize +=
818 MS->
emitInt8(dwarf::DW_LLE_default_location);
819 LocListsSectionSize += 1;
824 (
const char *)LocExpression.Expr.data(), LocExpression.Expr.size()));
825 LocListsSectionSize += LocExpression.Expr.size();
829 MS->emitInt8(dwarf::DW_LLE_end_of_list);
830 LocListsSectionSize += 1;
837 std::vector<uint64_t> *RowOffsets) {
839 MS->switchSection(MC->getObjectFileInfo()->getDwarfLineSection());
841 MCSymbol *LineStartSym = MC->createTempSymbol();
842 MCSymbol *LineEndSym = MC->createTempSymbol();
847 LineSectionSize += 4;
849 emitLabelDifference(LineEndSym, LineStartSym,
851 Asm->OutStreamer->emitLabel(LineStartSym);
854 emitLineTablePrologue(LineTable.
Prologue, DebugStrPool, DebugLineStrPool);
857 emitLineTableRows(LineTable, LineEndSym,
858 Unit.getOrigUnit().getAddressByteSize(), RowOffsets);
864 MCSymbol *PrologueStartSym = MC->createTempSymbol();
865 MCSymbol *PrologueEndSym = MC->createTempSymbol();
869 LineSectionSize += 2;
870 if (
P.getVersion() == 5) {
873 LineSectionSize += 1;
877 LineSectionSize += 1;
881 emitLabelDifference(PrologueEndSym, PrologueStartSym,
P.FormParams.Format,
884 Asm->OutStreamer->emitLabel(PrologueStartSym);
885 emitLineTableProloguePayload(
P, DebugStrPool, DebugLineStrPool);
886 Asm->OutStreamer->emitLabel(PrologueEndSym);
889void DwarfStreamer::emitLineTablePrologueV2IncludeAndFileTable(
894 emitLineTableString(
P,
Include, DebugStrPool, DebugLineStrPool);
897 LineSectionSize += 1;
903 emitLineTableString(
P, File.Name, DebugStrPool, DebugLineStrPool);
916 LineSectionSize += 1;
919void DwarfStreamer::emitLineTablePrologueV5IncludeAndFileTable(
922 if (
P.IncludeDirectories.empty()) {
925 LineSectionSize += 1;
929 LineSectionSize += 1;
932 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_path);
934 MS->emitULEB128IntValue(
P.IncludeDirectories[0].getForm());
938 LineSectionSize += MS->emitULEB128IntValue(
P.IncludeDirectories.size());
940 for (
auto Include :
P.IncludeDirectories)
941 emitLineTableString(
P,
Include, DebugStrPool, DebugLineStrPool);
943 bool HasChecksums =
P.ContentTypes.HasMD5;
944 bool HasInlineSources =
P.ContentTypes.HasSource;
946 if (
P.FileNames.empty()) {
949 LineSectionSize += 1;
952 MS->emitInt8(2 + (HasChecksums ? 1 : 0) + (HasInlineSources ? 1 : 0));
953 LineSectionSize += 1;
956 auto StrForm =
P.FileNames[0].Name.getForm();
957 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_path);
958 LineSectionSize += MS->emitULEB128IntValue(StrForm);
960 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_directory_index);
961 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_FORM_udata);
964 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_MD5);
965 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_FORM_data16);
968 if (HasInlineSources) {
969 LineSectionSize += MS->emitULEB128IntValue(dwarf::DW_LNCT_LLVM_source);
970 LineSectionSize += MS->emitULEB128IntValue(StrForm);
975 LineSectionSize += MS->emitULEB128IntValue(
P.FileNames.size());
978 for (
auto File :
P.FileNames) {
979 emitLineTableString(
P,
File.Name, DebugStrPool, DebugLineStrPool);
980 LineSectionSize += MS->emitULEB128IntValue(
File.DirIdx);
983 StringRef(
reinterpret_cast<const char *
>(
File.Checksum.data()),
984 File.Checksum.size()));
985 LineSectionSize +=
File.Checksum.size();
987 if (HasInlineSources)
988 emitLineTableString(
P,
File.Source, DebugStrPool, DebugLineStrPool);
992void DwarfStreamer::emitLineTableString(
const DWARFDebugLine::Prologue &
P,
993 const DWARFFormValue &
String,
998 warn(
"Cann't read string from line table.");
1002 switch (
String.getForm()) {
1003 case dwarf::DW_FORM_string: {
1004 StringRef Str = *StringVal;
1005 Asm->OutStreamer->emitBytes(Str.data());
1007 LineSectionSize += Str.size() + 1;
1009 case dwarf::DW_FORM_strp:
1010 case dwarf::DW_FORM_line_strp: {
1011 DwarfStringPoolEntryRef StringRef =
1012 String.getForm() == dwarf::DW_FORM_strp
1013 ? DebugStrPool.
getEntry(*StringVal)
1014 : DebugLineStrPool.
getEntry(*StringVal);
1016 emitIntOffset(StringRef.
getOffset(),
P.FormParams.Format, LineSectionSize);
1019 warn(
"Unsupported string form inside line table.");
1024void DwarfStreamer::emitLineTableProloguePayload(
1028 MS->emitInt8(
P.MinInstLength);
1029 LineSectionSize += 1;
1030 if (
P.FormParams.Version >= 4) {
1032 MS->emitInt8(
P.MaxOpsPerInst);
1033 LineSectionSize += 1;
1036 MS->emitInt8(
P.DefaultIsStmt);
1037 LineSectionSize += 1;
1039 MS->emitInt8(
P.LineBase);
1040 LineSectionSize += 1;
1042 MS->emitInt8(
P.LineRange);
1043 LineSectionSize += 1;
1045 MS->emitInt8(
P.OpcodeBase);
1046 LineSectionSize += 1;
1049 for (
auto Length :
P.StandardOpcodeLengths) {
1051 LineSectionSize += 1;
1054 if (
P.FormParams.Version < 5)
1055 emitLineTablePrologueV2IncludeAndFileTable(
P, DebugStrPool,
1058 emitLineTablePrologueV5IncludeAndFileTable(
P, DebugStrPool,
1062void DwarfStreamer::emitLineTableRows(
1063 const DWARFDebugLine::LineTable &LineTable, MCSymbol *LineEndSym,
1064 unsigned AddressByteSize, std::vector<uint64_t> *RowOffsets) {
1066 MCDwarfLineTableParams Params;
1071 SmallString<128> EncodingBuffer;
1073 if (LineTable.
Rows.empty()) {
1078 MS->emitBytes(EncodingBuffer);
1079 LineSectionSize += EncodingBuffer.
size();
1080 MS->emitLabel(LineEndSym);
1085 unsigned FileNum = 1;
1086 unsigned LastLine = 1;
1087 unsigned Column = 0;
1089 unsigned IsStatement = 1;
1093 unsigned RowsSinceLastSequence = 0;
1095 for (
const DWARFDebugLine::Row &Row : LineTable.
Rows) {
1099 RowOffsets->push_back(LineSectionSize);
1103 MS->emitIntValue(dwarf::DW_LNS_extended_op, 1);
1104 MS->emitULEB128IntValue(AddressByteSize + 1);
1105 MS->emitIntValue(dwarf::DW_LNE_set_address, 1);
1106 MS->emitIntValue(Row.Address.Address, AddressByteSize);
1120 if (FileNum != Row.File) {
1122 MS->emitIntValue(dwarf::DW_LNS_set_file, 1);
1123 MS->emitULEB128IntValue(FileNum);
1126 if (Column != Row.Column) {
1127 Column = Row.Column;
1128 MS->emitIntValue(dwarf::DW_LNS_set_column, 1);
1129 MS->emitULEB128IntValue(Column);
1132 if (Discriminator != Row.Discriminator &&
1133 MS->getContext().getDwarfVersion() >= 4) {
1136 MS->emitIntValue(dwarf::DW_LNS_extended_op, 1);
1137 MS->emitULEB128IntValue(
Size + 1);
1138 MS->emitIntValue(dwarf::DW_LNE_set_discriminator, 1);
1139 MS->emitULEB128IntValue(Discriminator);
1145 if (Isa != Row.Isa) {
1147 MS->emitIntValue(dwarf::DW_LNS_set_isa, 1);
1148 MS->emitULEB128IntValue(Isa);
1151 if (IsStatement != Row.IsStmt) {
1152 IsStatement = Row.IsStmt;
1153 MS->emitIntValue(dwarf::DW_LNS_negate_stmt, 1);
1154 LineSectionSize += 1;
1156 if (Row.BasicBlock) {
1157 MS->emitIntValue(dwarf::DW_LNS_set_basic_block, 1);
1158 LineSectionSize += 1;
1161 if (Row.PrologueEnd) {
1162 MS->emitIntValue(dwarf::DW_LNS_set_prologue_end, 1);
1163 LineSectionSize += 1;
1166 if (Row.EpilogueBegin) {
1167 MS->emitIntValue(dwarf::DW_LNS_set_epilogue_begin, 1);
1168 LineSectionSize += 1;
1171 int64_t LineDelta = int64_t(Row.Line) - LastLine;
1172 if (!Row.EndSequence) {
1175 MS->emitBytes(EncodingBuffer);
1176 LineSectionSize += EncodingBuffer.
size();
1177 EncodingBuffer.
resize(0);
1178 Address = Row.Address.Address;
1179 LastLine = Row.Line;
1180 RowsSinceLastSequence++;
1183 MS->emitIntValue(dwarf::DW_LNS_advance_line, 1);
1184 MS->emitSLEB128IntValue(LineDelta);
1188 MS->emitIntValue(dwarf::DW_LNS_advance_pc, 1);
1194 MS->emitBytes(EncodingBuffer);
1195 LineSectionSize += EncodingBuffer.
size();
1196 EncodingBuffer.
resize(0);
1198 LastLine = FileNum = IsStatement = 1;
1203 if (RowsSinceLastSequence) {
1206 MS->emitBytes(EncodingBuffer);
1207 LineSectionSize += EncodingBuffer.
size();
1208 EncodingBuffer.
resize(0);
1211 MS->emitLabel(LineEndSym);
1221void DwarfStreamer::emitLabelDifference(
const MCSymbol *
Hi,
const MCSymbol *
Lo,
1225 Asm->emitLabelDifference(
Hi,
Lo,
Size);
1231void DwarfStreamer::emitPubSectionForUnit(
1232 MCSection *Sec, StringRef SecName,
const CompileUnit &Unit,
1233 const std::vector<CompileUnit::AccelInfo> &Names) {
1238 Asm->OutStreamer->switchSection(Sec);
1239 MCSymbol *BeginLabel = Asm->createTempSymbol(
"pub" + SecName +
"_begin");
1240 MCSymbol *EndLabel = Asm->createTempSymbol(
"pub" + SecName +
"_end");
1242 bool HeaderEmitted =
false;
1244 for (
const auto &Name : Names) {
1245 if (
Name.SkipPubSection)
1248 if (!HeaderEmitted) {
1250 Asm->emitLabelDifference(EndLabel, BeginLabel, 4);
1251 Asm->OutStreamer->emitLabel(BeginLabel);
1253 Asm->emitInt32(
Unit.getStartOffset());
1254 Asm->emitInt32(
Unit.getNextUnitOffset() -
Unit.getStartOffset());
1255 HeaderEmitted =
true;
1257 Asm->emitInt32(
Name.Die->getOffset());
1260 Asm->OutStreamer->emitBytes(
Name.Name.getString());
1268 Asm->OutStreamer->emitLabel(EndLabel);
1273 emitPubSectionForUnit(MC->getObjectFileInfo()->getDwarfPubNamesSection(),
1274 "names", Unit, Unit.getPubnames());
1279 emitPubSectionForUnit(MC->getObjectFileInfo()->getDwarfPubTypesSection(),
1280 "types", Unit, Unit.getPubtypes());
1285 MS->switchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
1287 MS->emitBytes(CIEBytes);
1288 FrameSectionSize += CIEBytes.
size();
1296 MS->switchSection(MC->getObjectFileInfo()->getDwarfFrameSection());
1298 MS->emitIntValue(FDEBytes.
size() + 4 + AddrSize, 4);
1299 MS->emitIntValue(CIEOffset, 4);
1300 MS->emitIntValue(
Address, AddrSize);
1301 MS->emitBytes(FDEBytes);
1302 FrameSectionSize += FDEBytes.
size() + 8 + AddrSize;
1308 assert(Context !=
nullptr &&
"Empty DWARF context");
1312 MS->switchSection(MC->getObjectFileInfo()->getDwarfMacinfoSection());
1313 emitMacroTableImpl(
Table, UnitMacroMap,
StringPool, MacInfoSectionSize);
1318 MS->switchSection(MC->getObjectFileInfo()->getDwarfMacroSection());
1319 emitMacroTableImpl(
Table, UnitMacroMap,
StringPool, MacroSectionSize);
1323void DwarfStreamer::emitMacroTableImpl(
const DWARFDebugMacro *MacroTable,
1326 uint64_t &OutOffset) {
1327 bool DefAttributeIsReported =
false;
1328 bool UndefAttributeIsReported =
false;
1329 bool ImportAttributeIsReported =
false;
1330 for (
const DWARFDebugMacro::MacroList &
List : MacroTable->MacroLists) {
1332 if (UnitIt == UnitMacroMap.
end()) {
1334 "couldn`t find compile unit for the macro table with offset = {0:x}",
1340 DIE *OutputUnitDIE = UnitIt->second->getOutputUnitDIE();
1341 if (OutputUnitDIE ==
nullptr)
1346 bool hasDWARFv5Header =
false;
1347 for (
auto &V : OutputUnitDIE->
values()) {
1348 if (V.getAttribute() == dwarf::DW_AT_macro_info) {
1351 }
else if (V.getAttribute() == dwarf::DW_AT_macros) {
1352 hasDWARFv5Header =
true;
1359 if (hasDWARFv5Header) {
1361 MS->emitIntValue(
List.Header.Version,
sizeof(
List.Header.Version));
1362 OutOffset +=
sizeof(
List.Header.Version);
1368 DWARFDebugMacro::HeaderFlagMask::MACRO_OPCODE_OPERANDS_TABLE) {
1369 Flags &= ~DWARFDebugMacro::HeaderFlagMask::MACRO_OPCODE_OPERANDS_TABLE;
1370 warn(
"opcode_operands_table is not supported yet.");
1374 std::optional<uint64_t> StmtListOffset;
1375 if (Flags & DWARFDebugMacro::HeaderFlagMask::MACRO_DEBUG_LINE_OFFSET) {
1377 for (
auto &V : OutputUnitDIE->
values()) {
1378 if (
V.getAttribute() == dwarf::DW_AT_stmt_list) {
1379 StmtListOffset =
V.getDIEInteger().getValue();
1384 if (!StmtListOffset) {
1385 Flags &= ~DWARFDebugMacro::HeaderFlagMask::MACRO_DEBUG_LINE_OFFSET;
1386 warn(
"couldn`t find line table for macro table.");
1391 MS->emitIntValue(Flags,
sizeof(Flags));
1392 OutOffset +=
sizeof(
Flags);
1395 if (StmtListOffset) {
1396 MS->emitIntValue(*StmtListOffset,
List.Header.getOffsetByteSize());
1397 OutOffset +=
List.Header.getOffsetByteSize();
1402 for (
const DWARFDebugMacro::Entry &MacroEntry :
List.Macros) {
1403 if (MacroEntry.Type == 0) {
1404 OutOffset += MS->emitULEB128IntValue(MacroEntry.Type);
1408 uint8_t MacroType = MacroEntry.Type;
1409 switch (MacroType) {
1411 bool HasVendorSpecificExtension =
1416 if (HasVendorSpecificExtension) {
1418 MS->emitIntValue(MacroType, 1);
1422 OutOffset += MS->emitULEB128IntValue(MacroEntry.ExtConstant);
1425 StringRef
String = MacroEntry.ExtStr;
1427 MS->emitIntValue(0, 1);
1428 OutOffset +=
String.size() + 1;
1430 warn(
"unknown macro type. skip.");
1438 case dwarf::DW_MACRO_define:
1439 case dwarf::DW_MACRO_undef: {
1441 MS->emitIntValue(MacroType, 1);
1445 OutOffset += MS->emitULEB128IntValue(MacroEntry.Line);
1448 StringRef
String = MacroEntry.MacroStr;
1450 MS->emitIntValue(0, 1);
1451 OutOffset +=
String.size() + 1;
1453 case dwarf::DW_MACRO_define_strp:
1454 case dwarf::DW_MACRO_undef_strp:
1455 case dwarf::DW_MACRO_define_strx:
1456 case dwarf::DW_MACRO_undef_strx: {
1457 assert(UnitIt->second->getOrigUnit().getVersion() >= 5);
1461 switch (MacroType) {
1462 case dwarf::DW_MACRO_define_strx: {
1463 MacroType = dwarf::DW_MACRO_define_strp;
1464 if (!DefAttributeIsReported) {
1465 warn(
"DW_MACRO_define_strx unsupported yet. Convert to "
1466 "DW_MACRO_define_strp.");
1467 DefAttributeIsReported =
true;
1470 case dwarf::DW_MACRO_undef_strx: {
1471 MacroType = dwarf::DW_MACRO_undef_strp;
1472 if (!UndefAttributeIsReported) {
1473 warn(
"DW_MACRO_undef_strx unsupported yet. Convert to "
1474 "DW_MACRO_undef_strp.");
1475 UndefAttributeIsReported =
true;
1484 MS->emitIntValue(MacroType, 1);
1488 OutOffset += MS->emitULEB128IntValue(MacroEntry.Line);
1491 DwarfStringPoolEntryRef EntryRef =
1492 StringPool.
getEntry(MacroEntry.MacroStr);
1493 MS->emitIntValue(EntryRef.
getOffset(),
List.Header.getOffsetByteSize());
1494 OutOffset +=
List.Header.getOffsetByteSize();
1497 case dwarf::DW_MACRO_start_file: {
1499 MS->emitIntValue(MacroType, 1);
1502 OutOffset += MS->emitULEB128IntValue(MacroEntry.Line);
1504 OutOffset += MS->emitULEB128IntValue(MacroEntry.File);
1506 case dwarf::DW_MACRO_end_file: {
1508 MS->emitIntValue(MacroType, 1);
1511 case dwarf::DW_MACRO_import:
1512 case dwarf::DW_MACRO_import_sup: {
1513 if (!ImportAttributeIsReported) {
1514 warn(
"DW_MACRO_import and DW_MACRO_import_sup are unsupported yet. "
1516 ImportAttributeIsReported =
true;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High))
std::unique_ptr< MCStreamer > && Streamer
This class holds an abstract representation of an Accelerator Table, consisting of a sequence of buck...
A class that represents an address range.
The AddressRanges class helps normalize address range collections.
static dwarf::Form BestForm(bool IsSigned, uint64_t Int)
Choose the best form for integer.
A structured debug information entry.
The Data class implementation for DWARF v5 accelerator table.
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
iterator find(const_arg_type_t< KeyT > Val)
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
uint64_t getOffset() const
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Context object for machine code objects.
static LLVM_ABI void encode(MCContext &Context, MCDwarfLineTableParams Params, int64_t LineDelta, uint64_t AddrDelta, SmallVectorImpl< char > &OS)
Utility function to encode a Dwarf pair of LineDelta and AddrDeltas.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
void setAlignment(Align Value)
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
void emitInt16(uint64_t Value)
unsigned emitULEB128IntValue(uint64_t Value, unsigned PadTo=0)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
void emitInt8(uint64_t Value)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A string table that doesn't need relocations.
LLVM_ABI DwarfStringPoolEntryRef getEntry(StringRef S)
LLVM_ABI std::vector< DwarfStringPoolEntryRef > getEntriesForEmission() const
Return the list of strings to be emitted.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
constexpr size_t size() const
Get the string size.
Target - Wrapper for Target specific information.
TargetMachine * createTargetMachine(const Triple &TT, StringRef CPU, StringRef Features, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM=std::nullopt, CodeGenOptLevel OL=CodeGenOptLevel::Default, bool JIT=false) const
createTargetMachine - Create a target specific machine implementation for the specified Triple.
MCRegisterInfo * createMCRegInfo(const Triple &TT) const
Create a MCRegisterInfo implementation.
MCCodeEmitter * createMCCodeEmitter(const MCInstrInfo &II, MCContext &Ctx) const
createMCCodeEmitter - Create a target specific code emitter.
MCObjectFileInfo * createMCObjectFileInfo(MCContext &Ctx, bool PIC, bool LargeCodeModel=false) const
Create a MCObjectFileInfo implementation for the specified target triple.
MCAsmInfo * createMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TheTriple, const MCTargetOptions &Options) const
Create a MCAsmInfo implementation for the specified target triple.
MCAsmBackend * createMCAsmBackend(const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options) const
createMCAsmBackend - Create a target specific assembly parser.
LLVM_ABI MCStreamer * createAsmStreamer(MCContext &Ctx, std::unique_ptr< formatted_raw_ostream > OS, std::unique_ptr< MCInstPrinter > IP, std::unique_ptr< MCCodeEmitter > CE, std::unique_ptr< MCAsmBackend > TAB) const
LLVM_ABI MCStreamer * createMCObjectStreamer(const Triple &T, MCContext &Ctx, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter, const MCSubtargetInfo &STI) const
Create a target specific MCStreamer.
MCInstPrinter * createMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) const
MCSubtargetInfo * createMCSubtargetInfo(const Triple &TheTriple, StringRef CPU, StringRef Features) const
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
AsmPrinter * createAsmPrinter(TargetMachine &TM, std::unique_ptr< MCStreamer > &&Streamer) const
createAsmPrinter - Create a target specific assembly printer pass.
MCInstrInfo * createMCInstrInfo() const
createMCInstrInfo - Create a MCInstrInfo implementation.
Triple - Helper class for working with autoconf configuration names.
const std::string & getTriple() const
std::function< void( const Twine &Warning, StringRef Context, const DWARFDie *DIE)> MessageHandlerTy
OutputFileType
Type of output file.
uint64_t getValueIndex(T Value)
Stores all information relating to a compile unit, be it in its original instance in the object file ...
Error emitDwarfDebugLocListFragment(const CompileUnit &Unit, const DWARFLocationExpressionsVector &LinkedLocationExpression, PatchLocation Patch, DebugDieValuePool &AddrPool) override
Emit debug ranges(.debug_loc, .debug_loclists) fragment.
void emitDwarfDebugAddrsFooter(const CompileUnit &Unit, MCSymbol *EndLabel) override
Emit .debug_addr footer.
void emitDwarfDebugArangesTable(const CompileUnit &Unit, const AddressRanges &LinkedRanges) override
Emit .debug_aranges entries for Unit.
void emitLineTableForUnit(const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit, OffsetsStringPool &DebugStrPool, OffsetsStringPool &DebugLineStrPool, std::vector< uint64_t > *RowOffsets=nullptr) override
Emit .debug_line table entry for specified LineTable The optional parameter RowOffsets,...
void emitAppleTypes(AccelTable< AppleAccelTableStaticTypeData > &Table) override
Emit Apple type accelerator table.
void emitDIE(DIE &Die) override
Recursively emit the DIE tree rooted at Die.
void emitStrings(const NonRelocatableStringpool &Pool) override
Emit the string table described by Pool into .debug_str table.
static Expected< std::unique_ptr< DwarfStreamer > > createStreamer(const Triple &TheTriple, DWARFLinkerBase::OutputFileType FileType, raw_pwrite_stream &OutFile, DWARFLinkerBase::MessageHandlerTy Warning)
void emitDebugNames(DWARF5AccelTable &Table) override
Emit DWARF debug names.
void emitDwarfDebugLocListFooter(const CompileUnit &Unit, MCSymbol *EndLabel) override
Emit debug ranges(.debug_loc, .debug_loclists) footer.
MCSymbol * emitDwarfDebugAddrsHeader(const CompileUnit &Unit) override
Emit .debug_addr header.
void emitStringOffsets(const SmallVector< uint64_t > &StringOffset, uint16_t TargetDWARFVersion) override
Emit the debug string offset table described by StringOffsets into the .debug_str_offsets table.
void emitLineStrings(const NonRelocatableStringpool &Pool) override
Emit the string table described by Pool into .debug_line_str table.
Error init(Triple TheTriple, StringRef Swift5ReflectionSegmentName)
void emitSwiftReflectionSection(llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind, StringRef Buffer, uint32_t Alignment, uint32_t Size)
Emit the swift reflection section stored in Buffer.
MCSymbol * emitDwarfDebugRangeListHeader(const CompileUnit &Unit) override
Emit debug ranges(.debug_ranges, .debug_rnglists) header.
void emitCIE(StringRef CIEBytes) override
Emit a CIE.
void emitSectionContents(StringRef SecData, DebugSectionKind SecKind) override
Emit contents of section SecName From Obj.
void emitAppleNames(AccelTable< AppleAccelTableStaticOffsetData > &Table) override
Emit Apple names accelerator table.
void finish() override
Dump the file to the disk.
void emitAbbrevs(const std::vector< std::unique_ptr< DIEAbbrev > > &Abbrevs, unsigned DwarfVersion) override
Emit the abbreviation table Abbrevs to the debug_abbrev section.
MCSymbol * emitDwarfDebugLocListHeader(const CompileUnit &Unit) override
Emit debug locations(.debug_loc, .debug_loclists) header.
void emitFDE(uint32_t CIEOffset, uint32_t AddreSize, uint64_t Address, StringRef Bytes) override
Emit an FDE with data Bytes.
void emitPubNamesForUnit(const CompileUnit &Unit) override
Emit the .debug_pubnames contribution for Unit.
void emitPubTypesForUnit(const CompileUnit &Unit) override
Emit the .debug_pubtypes contribution for Unit.
void emitDwarfDebugAddrs(const SmallVector< uint64_t > &Addrs, uint8_t AddrSize) override
Emit the addresses described by Addrs into .debug_addr table.
void emitAppleObjc(AccelTable< AppleAccelTableStaticOffsetData > &Table) override
Emit Apple Objective-C accelerator table.
void emitAppleNamespaces(AccelTable< AppleAccelTableStaticOffsetData > &Table) override
Emit Apple namespaces accelerator table.
void emitMacroTables(DWARFContext *Context, const Offset2UnitMap &UnitMacroMap, OffsetsStringPool &StringPool) override
Emit all available macro tables(DWARFv4 and DWARFv5).
void switchToDebugInfoSection(unsigned DwarfVersion)
Set the current output section to debug_info and change the MC Dwarf version to DwarfVersion.
void emitCompileUnitHeader(CompileUnit &Unit, unsigned DwarfVersion) override
Emit the compilation unit header for Unit in the debug_info section.
void emitSwiftAST(StringRef Buffer)
Emit the swift_ast section stored in Buffer.
Error emitDwarfDebugRangeListFragment(const CompileUnit &Unit, const AddressRanges &LinkedRanges, PatchLocation Patch, DebugDieValuePool &AddrPool) override
Emit debug ranges(.debug_ranges, .debug_rnglists) fragment.
void emitDwarfDebugRangeListFooter(const CompileUnit &Unit, MCSymbol *EndLabel) override
Emit debug ranges(.debug_ranges, .debug_rnglists) footer.
An abstract base class for streams implementations that also support a pwrite operation.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
IndexedValuesMap< uint64_t > DebugDieValuePool
DenseMap< uint64_t, CompileUnit * > Offset2UnitMap
DebugSectionKind
List of tracked debug tables.
std::optional< const char * > toString(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a string value from it.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
uint8_t getDwarfOffsetByteSize(DwarfFormat Format)
The size of a reference determined by the DWARF 32/64-bit format.
@ DW_ARANGES_VERSION
Section version number for .debug_aranges.
@ DW_PUBNAMES_VERSION
Section version number for .debug_pubnames.
@ DW_LENGTH_DWARF64
Indicator of 64-bit DWARF format.
LLVM_ABI MCTargetOptions InitMCTargetOptionsFromFlags()
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
uint64_t offsetToAlignment(uint64_t Value, Align Alignment)
Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a mu...
LLVM_ABI unsigned getULEB128Size(uint64_t Value)
Utility function to get the size of the ULEB128-encoded value.
void emitAppleAccelTable(AsmPrinter *Asm, AccelTable< DataT > &Contents, StringRef Prefix, const MCSymbol *SecBegin)
Emit an Apple Accelerator Table consisting of entries in the specified AccelTable.
LLVM_ABI void emitDWARF5AccelTable(AsmPrinter *Asm, DWARF5AccelTable &Contents, const DwarfDebug &DD, ArrayRef< std::unique_ptr< DwarfCompileUnit > > CUs)
StrongType< NonRelocatableStringpool, OffsetsTag > OffsetsStringPool
LLVM_ABI unsigned getSLEB128Size(int64_t Value)
Utility function to get the size of the SLEB128-encoded value.
std::vector< DWARFLocationExpression > DWARFLocationExpressionsVector
Represents a set of absolute location expressions.
This struct is a compact representation of a valid (non-zero power of two) alignment.
uint8_t MinInstLength
The size in bytes of the smallest target machine instruction.
int8_t LineBase
This parameter affects the meaning of the special opcodes. See below.
uint8_t LineRange
This parameter affects the meaning of the special opcodes. See below.
uint8_t OpcodeBase
The number assigned to the first special opcode.
dwarf::FormParams FormParams
Version, address size (starting in v5), and DWARF32/64 format; these parameters affect interpretation...
Represents a single DWARF expression, whose value is location-dependent.
uint8_t DWARF2LineOpcodeBase
First special line opcode - leave room for the standard opcodes.
uint8_t DWARF2LineRange
Range of line offsets in a special line info. opcode.
int8_t DWARF2LineBase
Minimum line offset in a special line info.
static LLVM_ABI const Target * lookupTarget(const Triple &TheTriple, std::string &Error)
lookupTarget - Lookup a target based on a target triple.
void set(uint64_t New) const