| 1 | //===- DebugLineSectionEmitter.h --------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_LIB_DWARFLINKER_PARALLEL_DEBUGLINESECTIONEMITTER_H |
| 10 | #define LLVM_LIB_DWARFLINKER_PARALLEL_DEBUGLINESECTIONEMITTER_H |
| 11 | |
| 12 | #include "DWARFEmitterImpl.h" |
| 13 | #include "llvm/DWARFLinker/AddressesMap.h" |
| 14 | #include "llvm/DWARFLinker/Parallel/DWARFLinker.h" |
| 15 | #include "llvm/DebugInfo/DWARF/DWARFObject.h" |
| 16 | #include "llvm/MC/MCTargetOptionsCommandFlags.h" |
| 17 | #include "llvm/MC/TargetRegistry.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | namespace dwarf_linker { |
| 21 | namespace parallel { |
| 22 | |
| 23 | /// This class emits specified line table into the .debug_line section. |
| 24 | class DebugLineSectionEmitter { |
| 25 | public: |
| 26 | DebugLineSectionEmitter(const Triple &TheTriple, DwarfUnit &U) |
| 27 | : TheTriple(TheTriple), U(U) {} |
| 28 | |
| 29 | Error emit(const DWARFDebugLine::LineTable &LineTable, |
| 30 | ArrayRef<uint64_t> OrigRowIndices = {}, |
| 31 | DenseMap<uint64_t, uint64_t> *RowIndexToSeqStartOffset = nullptr) { |
| 32 | // FIXME: remove dependence on MCDwarfLineAddr::encode. |
| 33 | // As we reuse MCDwarfLineAddr::encode, we need to create/initialize |
| 34 | // some MC* classes. |
| 35 | if (Error Err = init(TheTriple)) |
| 36 | return Err; |
| 37 | |
| 38 | // Get descriptor for output .debug_line section. |
| 39 | SectionDescriptor &OutSection = |
| 40 | U.getOrCreateSectionDescriptor(SectionKind: DebugSectionKind::DebugLine); |
| 41 | |
| 42 | // unit_length. |
| 43 | OutSection.emitUnitLength(Length: 0xBADDEF); |
| 44 | uint64_t OffsetAfterUnitLength = OutSection.OS.tell(); |
| 45 | |
| 46 | // Emit prologue. |
| 47 | emitLineTablePrologue(P: LineTable.Prologue, Section&: OutSection); |
| 48 | |
| 49 | // Emit rows. |
| 50 | emitLineTableRows(LineTable, Section&: OutSection, OrigRowIndices, |
| 51 | RowIndexToSeqStartOffset); |
| 52 | uint64_t OffsetAfterEnd = OutSection.OS.tell(); |
| 53 | |
| 54 | // Update unit length field with actual length value. |
| 55 | assert(OffsetAfterUnitLength - |
| 56 | OutSection.getFormParams().getDwarfOffsetByteSize() < |
| 57 | OffsetAfterUnitLength); |
| 58 | OutSection.apply(PatchOffset: OffsetAfterUnitLength - |
| 59 | OutSection.getFormParams().getDwarfOffsetByteSize(), |
| 60 | AttrForm: dwarf::DW_FORM_sec_offset, |
| 61 | Val: OffsetAfterEnd - OffsetAfterUnitLength); |
| 62 | |
| 63 | return Error::success(); |
| 64 | } |
| 65 | |
| 66 | private: |
| 67 | Error init(Triple TheTriple) { |
| 68 | std::string ErrorStr; |
| 69 | std::string TripleName; |
| 70 | |
| 71 | // Get the target. |
| 72 | const Target *TheTarget = |
| 73 | TargetRegistry::lookupTarget(ArchName: TripleName, TheTriple, Error&: ErrorStr); |
| 74 | if (!TheTarget) |
| 75 | return createStringError(EC: std::errc::invalid_argument, Fmt: ErrorStr.c_str()); |
| 76 | TripleName = TheTriple.getTriple(); |
| 77 | |
| 78 | // Create all the MC Objects. |
| 79 | MRI.reset(p: TheTarget->createMCRegInfo(TT: TheTriple)); |
| 80 | if (!MRI) |
| 81 | return createStringError(EC: std::errc::invalid_argument, |
| 82 | Fmt: "no register info for target %s" , |
| 83 | Vals: TripleName.c_str()); |
| 84 | |
| 85 | MCOptions = mc::InitMCTargetOptionsFromFlags(); |
| 86 | MAI.reset(p: TheTarget->createMCAsmInfo(MRI: *MRI, TheTriple, Options: MCOptions)); |
| 87 | if (!MAI) |
| 88 | return createStringError(EC: std::errc::invalid_argument, |
| 89 | Fmt: "no asm info for target %s" , Vals: TripleName.c_str()); |
| 90 | |
| 91 | MSTI.reset(p: TheTarget->createMCSubtargetInfo(TheTriple, CPU: "" , Features: "" )); |
| 92 | if (!MSTI) |
| 93 | return createStringError(EC: std::errc::invalid_argument, |
| 94 | Fmt: "no subtarget info for target %s" , |
| 95 | Vals: TripleName.c_str()); |
| 96 | |
| 97 | MC.reset( |
| 98 | p: new MCContext(TheTriple, *MAI, *MRI, *MSTI, nullptr, true, "__DWARF" )); |
| 99 | |
| 100 | return Error::success(); |
| 101 | } |
| 102 | |
| 103 | void emitLineTablePrologue(const DWARFDebugLine::Prologue &P, |
| 104 | SectionDescriptor &Section) { |
| 105 | // version (uhalf). |
| 106 | Section.emitIntVal(Val: P.getVersion(), Size: 2); |
| 107 | if (P.getVersion() == 5) { |
| 108 | // address_size (ubyte). |
| 109 | Section.emitIntVal(Val: P.getAddressSize(), Size: 1); |
| 110 | |
| 111 | // segment_selector_size (ubyte). |
| 112 | Section.emitIntVal(Val: P.SegSelectorSize, Size: 1); |
| 113 | } |
| 114 | |
| 115 | // header_length. |
| 116 | Section.emitOffset(Val: 0xBADDEF); |
| 117 | |
| 118 | uint64_t OffsetAfterPrologueLength = Section.OS.tell(); |
| 119 | emitLineTableProloguePayload(P, Section); |
| 120 | uint64_t OffsetAfterPrologueEnd = Section.OS.tell(); |
| 121 | |
| 122 | // Update prologue length field with actual length value. |
| 123 | Section.apply(PatchOffset: OffsetAfterPrologueLength - |
| 124 | Section.getFormParams().getDwarfOffsetByteSize(), |
| 125 | AttrForm: dwarf::DW_FORM_sec_offset, |
| 126 | Val: OffsetAfterPrologueEnd - OffsetAfterPrologueLength); |
| 127 | } |
| 128 | |
| 129 | void |
| 130 | emitLineTablePrologueV2IncludeAndFileTable(const DWARFDebugLine::Prologue &P, |
| 131 | SectionDescriptor &Section) { |
| 132 | // include_directories (sequence of path names). |
| 133 | for (const DWARFFormValue &Include : P.IncludeDirectories) { |
| 134 | std::optional<const char *> IncludeStr = dwarf::toString(V: Include); |
| 135 | if (!IncludeStr) { |
| 136 | U.warn(Warning: "cann't read string from line table." ); |
| 137 | return; |
| 138 | } |
| 139 | |
| 140 | Section.emitString(StringForm: Include.getForm(), StringVal: *IncludeStr); |
| 141 | } |
| 142 | // The last entry is followed by a single null byte. |
| 143 | Section.emitIntVal(Val: 0, Size: 1); |
| 144 | |
| 145 | // file_names (sequence of file entries). |
| 146 | for (const DWARFDebugLine::FileNameEntry &File : P.FileNames) { |
| 147 | std::optional<const char *> FileNameStr = dwarf::toString(V: File.Name); |
| 148 | if (!FileNameStr) { |
| 149 | U.warn(Warning: "cann't read string from line table." ); |
| 150 | return; |
| 151 | } |
| 152 | |
| 153 | // A null-terminated string containing the full or relative path name of a |
| 154 | // source file. |
| 155 | Section.emitString(StringForm: File.Name.getForm(), StringVal: *FileNameStr); |
| 156 | |
| 157 | // An unsigned LEB128 number representing the directory index of a |
| 158 | // directory in the include_directories section. |
| 159 | encodeULEB128(Value: File.DirIdx, OS&: Section.OS); |
| 160 | // An unsigned LEB128 number representing the (implementation-defined) |
| 161 | // time of last modification for the file, or 0 if not available. |
| 162 | encodeULEB128(Value: File.ModTime, OS&: Section.OS); |
| 163 | // An unsigned LEB128 number representing the length in bytes of the file, |
| 164 | // or 0 if not available. |
| 165 | encodeULEB128(Value: File.Length, OS&: Section.OS); |
| 166 | } |
| 167 | // The last entry is followed by a single null byte. |
| 168 | Section.emitIntVal(Val: 0, Size: 1); |
| 169 | } |
| 170 | |
| 171 | void |
| 172 | emitLineTablePrologueV5IncludeAndFileTable(const DWARFDebugLine::Prologue &P, |
| 173 | SectionDescriptor &Section) { |
| 174 | if (P.IncludeDirectories.empty()) { |
| 175 | // directory_entry_format_count(ubyte). |
| 176 | Section.emitIntVal(Val: 0, Size: 1); |
| 177 | } else { |
| 178 | // directory_entry_format_count(ubyte). |
| 179 | Section.emitIntVal(Val: 1, Size: 1); |
| 180 | |
| 181 | // directory_entry_format (sequence of ULEB128 pairs). |
| 182 | encodeULEB128(Value: dwarf::DW_LNCT_path, OS&: Section.OS); |
| 183 | encodeULEB128(Value: P.IncludeDirectories[0].getForm(), OS&: Section.OS); |
| 184 | } |
| 185 | |
| 186 | // directories_count (ULEB128). |
| 187 | encodeULEB128(Value: P.IncludeDirectories.size(), OS&: Section.OS); |
| 188 | // directories (sequence of directory names). |
| 189 | for (auto Include : P.IncludeDirectories) { |
| 190 | std::optional<const char *> IncludeStr = dwarf::toString(V: Include); |
| 191 | if (!IncludeStr) { |
| 192 | U.warn(Warning: "cann't read string from line table." ); |
| 193 | return; |
| 194 | } |
| 195 | |
| 196 | Section.emitString(StringForm: Include.getForm(), StringVal: *IncludeStr); |
| 197 | } |
| 198 | |
| 199 | bool HasChecksums = P.ContentTypes.HasMD5; |
| 200 | bool HasInlineSources = P.ContentTypes.HasSource; |
| 201 | |
| 202 | dwarf::Form FileNameForm = dwarf::DW_FORM_string; |
| 203 | dwarf::Form LLVMSourceForm = dwarf::DW_FORM_string; |
| 204 | |
| 205 | if (P.FileNames.empty()) { |
| 206 | // file_name_entry_format_count (ubyte). |
| 207 | Section.emitIntVal(Val: 0, Size: 1); |
| 208 | } else { |
| 209 | FileNameForm = P.FileNames[0].Name.getForm(); |
| 210 | LLVMSourceForm = P.FileNames[0].Source.getForm(); |
| 211 | |
| 212 | // file_name_entry_format_count (ubyte). |
| 213 | Section.emitIntVal( |
| 214 | Val: 2 + (HasChecksums ? 1 : 0) + (HasInlineSources ? 1 : 0), Size: 1); |
| 215 | |
| 216 | // file_name_entry_format (sequence of ULEB128 pairs). |
| 217 | encodeULEB128(Value: dwarf::DW_LNCT_path, OS&: Section.OS); |
| 218 | encodeULEB128(Value: FileNameForm, OS&: Section.OS); |
| 219 | |
| 220 | encodeULEB128(Value: dwarf::DW_LNCT_directory_index, OS&: Section.OS); |
| 221 | encodeULEB128(Value: dwarf::DW_FORM_udata, OS&: Section.OS); |
| 222 | |
| 223 | if (HasChecksums) { |
| 224 | encodeULEB128(Value: dwarf::DW_LNCT_MD5, OS&: Section.OS); |
| 225 | encodeULEB128(Value: dwarf::DW_FORM_data16, OS&: Section.OS); |
| 226 | } |
| 227 | |
| 228 | if (HasInlineSources) { |
| 229 | encodeULEB128(Value: dwarf::DW_LNCT_LLVM_source, OS&: Section.OS); |
| 230 | encodeULEB128(Value: LLVMSourceForm, OS&: Section.OS); |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | // file_names_count (ULEB128). |
| 235 | encodeULEB128(Value: P.FileNames.size(), OS&: Section.OS); |
| 236 | |
| 237 | // file_names (sequence of file name entries). |
| 238 | for (auto File : P.FileNames) { |
| 239 | std::optional<const char *> FileNameStr = dwarf::toString(V: File.Name); |
| 240 | if (!FileNameStr) { |
| 241 | U.warn(Warning: "cann't read string from line table." ); |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | // A null-terminated string containing the full or relative path name of a |
| 246 | // source file. |
| 247 | Section.emitString(StringForm: FileNameForm, StringVal: *FileNameStr); |
| 248 | encodeULEB128(Value: File.DirIdx, OS&: Section.OS); |
| 249 | |
| 250 | if (HasChecksums) { |
| 251 | assert((File.Checksum.size() == 16) && |
| 252 | "checksum size is not equal to 16 bytes." ); |
| 253 | Section.emitBinaryData( |
| 254 | Data: StringRef(reinterpret_cast<const char *>(File.Checksum.data()), |
| 255 | File.Checksum.size())); |
| 256 | } |
| 257 | |
| 258 | if (HasInlineSources) { |
| 259 | std::optional<const char *> FileSourceStr = |
| 260 | dwarf::toString(V: File.Source); |
| 261 | if (!FileSourceStr) { |
| 262 | U.warn(Warning: "cann't read string from line table." ); |
| 263 | return; |
| 264 | } |
| 265 | |
| 266 | Section.emitString(StringForm: LLVMSourceForm, StringVal: *FileSourceStr); |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | void emitLineTableProloguePayload(const DWARFDebugLine::Prologue &P, |
| 272 | SectionDescriptor &Section) { |
| 273 | // minimum_instruction_length (ubyte). |
| 274 | Section.emitIntVal(Val: P.MinInstLength, Size: 1); |
| 275 | if (P.FormParams.Version >= 4) { |
| 276 | // maximum_operations_per_instruction (ubyte). |
| 277 | Section.emitIntVal(Val: P.MaxOpsPerInst, Size: 1); |
| 278 | } |
| 279 | // default_is_stmt (ubyte). |
| 280 | Section.emitIntVal(Val: P.DefaultIsStmt, Size: 1); |
| 281 | // line_base (sbyte). |
| 282 | Section.emitIntVal(Val: P.LineBase, Size: 1); |
| 283 | // line_range (ubyte). |
| 284 | Section.emitIntVal(Val: P.LineRange, Size: 1); |
| 285 | // opcode_base (ubyte). |
| 286 | Section.emitIntVal(Val: P.OpcodeBase, Size: 1); |
| 287 | |
| 288 | // standard_opcode_lengths (array of ubyte). |
| 289 | for (auto Length : P.StandardOpcodeLengths) |
| 290 | Section.emitIntVal(Val: Length, Size: 1); |
| 291 | |
| 292 | if (P.FormParams.Version < 5) |
| 293 | emitLineTablePrologueV2IncludeAndFileTable(P, Section); |
| 294 | else |
| 295 | emitLineTablePrologueV5IncludeAndFileTable(P, Section); |
| 296 | } |
| 297 | |
| 298 | void emitLineTableRows( |
| 299 | const DWARFDebugLine::LineTable &LineTable, SectionDescriptor &Section, |
| 300 | ArrayRef<uint64_t> OrigRowIndices = {}, |
| 301 | DenseMap<uint64_t, uint64_t> *RowIndexToSeqStartOffset = nullptr) { |
| 302 | |
| 303 | MCDwarfLineTableParams Params; |
| 304 | Params.DWARF2LineOpcodeBase = LineTable.Prologue.OpcodeBase; |
| 305 | Params.DWARF2LineBase = LineTable.Prologue.LineBase; |
| 306 | Params.DWARF2LineRange = LineTable.Prologue.LineRange; |
| 307 | |
| 308 | SmallString<128> EncodingBuffer; |
| 309 | |
| 310 | if (LineTable.Rows.empty()) { |
| 311 | // We only have the dummy entry, dsymutil emits an entry with a 0 |
| 312 | // address in that case. |
| 313 | MCDwarfLineAddr::encode(Context&: *MC, Params, LineDelta: std::numeric_limits<int64_t>::max(), |
| 314 | AddrDelta: 0, OS&: EncodingBuffer); |
| 315 | Section.OS.write(Ptr: EncodingBuffer.c_str(), Size: EncodingBuffer.size()); |
| 316 | return; |
| 317 | } |
| 318 | |
| 319 | // Line table state machine fields |
| 320 | unsigned FileNum = 1; |
| 321 | unsigned LastLine = 1; |
| 322 | unsigned Column = 0; |
| 323 | unsigned Discriminator = 0; |
| 324 | unsigned IsStatement = 1; |
| 325 | unsigned Isa = 0; |
| 326 | uint64_t Address = -1ULL; |
| 327 | |
| 328 | unsigned RowsSinceLastSequence = 0; |
| 329 | // Offset of the DW_LNE_set_address opcode that opens the sequence |
| 330 | // currently being emitted. Recorded per input row index so that |
| 331 | // DW_AT_LLVM_stmt_sequence attributes can be resolved by row — which |
| 332 | // is collision-free under ICF, unlike keying by output address. |
| 333 | uint64_t CurrentSeqStartOffset = 0; |
| 334 | constexpr uint64_t InvalidRowIndex = std::numeric_limits<uint64_t>::max(); |
| 335 | assert( |
| 336 | (!RowIndexToSeqStartOffset || |
| 337 | OrigRowIndices.size() == LineTable.Rows.size()) && |
| 338 | "OrigRowIndices must be supplied alongside RowIndexToSeqStartOffset" ); |
| 339 | |
| 340 | for (auto [Idx, Row] : llvm::enumerate(First: LineTable.Rows)) { |
| 341 | int64_t AddressDelta; |
| 342 | if (Address == -1ULL) { |
| 343 | CurrentSeqStartOffset = Section.OS.tell(); |
| 344 | Section.emitIntVal(Val: dwarf::DW_LNS_extended_op, Size: 1); |
| 345 | encodeULEB128(Value: Section.getFormParams().AddrSize + 1, OS&: Section.OS); |
| 346 | Section.emitIntVal(Val: dwarf::DW_LNE_set_address, Size: 1); |
| 347 | Section.emitIntVal(Val: Row.Address.Address, |
| 348 | Size: Section.getFormParams().AddrSize); |
| 349 | AddressDelta = 0; |
| 350 | } else { |
| 351 | AddressDelta = |
| 352 | (Row.Address.Address - Address) / LineTable.Prologue.MinInstLength; |
| 353 | } |
| 354 | if (RowIndexToSeqStartOffset) { |
| 355 | uint64_t InputRowIdx = OrigRowIndices[Idx]; |
| 356 | if (InputRowIdx != InvalidRowIndex) |
| 357 | (*RowIndexToSeqStartOffset)[InputRowIdx] = CurrentSeqStartOffset; |
| 358 | } |
| 359 | |
| 360 | // FIXME: code copied and transformed from |
| 361 | // MCDwarf.cpp::EmitDwarfLineTable. We should find a way to share this |
| 362 | // code, but the current compatibility requirement with classic dsymutil |
| 363 | // makes it hard. Revisit that once this requirement is dropped. |
| 364 | |
| 365 | if (FileNum != Row.File) { |
| 366 | FileNum = Row.File; |
| 367 | Section.emitIntVal(Val: dwarf::DW_LNS_set_file, Size: 1); |
| 368 | encodeULEB128(Value: FileNum, OS&: Section.OS); |
| 369 | } |
| 370 | if (Column != Row.Column) { |
| 371 | Column = Row.Column; |
| 372 | Section.emitIntVal(Val: dwarf::DW_LNS_set_column, Size: 1); |
| 373 | encodeULEB128(Value: Column, OS&: Section.OS); |
| 374 | } |
| 375 | if (Discriminator != Row.Discriminator && MC->getDwarfVersion() >= 4) { |
| 376 | Discriminator = Row.Discriminator; |
| 377 | unsigned Size = getULEB128Size(Value: Discriminator); |
| 378 | Section.emitIntVal(Val: dwarf::DW_LNS_extended_op, Size: 1); |
| 379 | encodeULEB128(Value: Size + 1, OS&: Section.OS); |
| 380 | Section.emitIntVal(Val: dwarf::DW_LNE_set_discriminator, Size: 1); |
| 381 | encodeULEB128(Value: Discriminator, OS&: Section.OS); |
| 382 | } |
| 383 | Discriminator = 0; |
| 384 | |
| 385 | if (Isa != Row.Isa) { |
| 386 | Isa = Row.Isa; |
| 387 | Section.emitIntVal(Val: dwarf::DW_LNS_set_isa, Size: 1); |
| 388 | encodeULEB128(Value: Isa, OS&: Section.OS); |
| 389 | } |
| 390 | if (IsStatement != Row.IsStmt) { |
| 391 | IsStatement = Row.IsStmt; |
| 392 | Section.emitIntVal(Val: dwarf::DW_LNS_negate_stmt, Size: 1); |
| 393 | } |
| 394 | if (Row.BasicBlock) |
| 395 | Section.emitIntVal(Val: dwarf::DW_LNS_set_basic_block, Size: 1); |
| 396 | |
| 397 | if (Row.PrologueEnd) |
| 398 | Section.emitIntVal(Val: dwarf::DW_LNS_set_prologue_end, Size: 1); |
| 399 | |
| 400 | if (Row.EpilogueBegin) |
| 401 | Section.emitIntVal(Val: dwarf::DW_LNS_set_epilogue_begin, Size: 1); |
| 402 | |
| 403 | int64_t LineDelta = int64_t(Row.Line) - LastLine; |
| 404 | if (!Row.EndSequence) { |
| 405 | MCDwarfLineAddr::encode(Context&: *MC, Params, LineDelta, AddrDelta: AddressDelta, |
| 406 | OS&: EncodingBuffer); |
| 407 | Section.OS.write(Ptr: EncodingBuffer.c_str(), Size: EncodingBuffer.size()); |
| 408 | EncodingBuffer.resize(N: 0); |
| 409 | Address = Row.Address.Address; |
| 410 | LastLine = Row.Line; |
| 411 | RowsSinceLastSequence++; |
| 412 | } else { |
| 413 | if (LineDelta) { |
| 414 | Section.emitIntVal(Val: dwarf::DW_LNS_advance_line, Size: 1); |
| 415 | encodeSLEB128(Value: LineDelta, OS&: Section.OS); |
| 416 | } |
| 417 | if (AddressDelta) { |
| 418 | Section.emitIntVal(Val: dwarf::DW_LNS_advance_pc, Size: 1); |
| 419 | encodeULEB128(Value: AddressDelta, OS&: Section.OS); |
| 420 | } |
| 421 | MCDwarfLineAddr::encode(Context&: *MC, Params, |
| 422 | LineDelta: std::numeric_limits<int64_t>::max(), AddrDelta: 0, |
| 423 | OS&: EncodingBuffer); |
| 424 | Section.OS.write(Ptr: EncodingBuffer.c_str(), Size: EncodingBuffer.size()); |
| 425 | EncodingBuffer.resize(N: 0); |
| 426 | Address = -1ULL; |
| 427 | LastLine = FileNum = IsStatement = 1; |
| 428 | RowsSinceLastSequence = Column = Discriminator = Isa = 0; |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | if (RowsSinceLastSequence) { |
| 433 | MCDwarfLineAddr::encode(Context&: *MC, Params, LineDelta: std::numeric_limits<int64_t>::max(), |
| 434 | AddrDelta: 0, OS&: EncodingBuffer); |
| 435 | Section.OS.write(Ptr: EncodingBuffer.c_str(), Size: EncodingBuffer.size()); |
| 436 | EncodingBuffer.resize(N: 0); |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | Triple TheTriple; |
| 441 | DwarfUnit &U; |
| 442 | |
| 443 | MCTargetOptions MCOptions; |
| 444 | std::unique_ptr<MCRegisterInfo> MRI; |
| 445 | std::unique_ptr<MCAsmInfo> MAI; |
| 446 | std::unique_ptr<MCContext> MC; |
| 447 | std::unique_ptr<MCSubtargetInfo> MSTI; |
| 448 | }; |
| 449 | |
| 450 | } // end of namespace parallel |
| 451 | } // end of namespace dwarf_linker |
| 452 | } // end of namespace llvm |
| 453 | |
| 454 | #endif // LLVM_LIB_DWARFLINKER_PARALLEL_DEBUGLINESECTIONEMITTER_H |
| 455 | |