LLVM  16.0.0git
MCDwarf.h
Go to the documentation of this file.
1 //===- MCDwarf.h - Machine Code Dwarf support -------------------*- 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 // This file contains the declaration of the MCDwarfFile to support the dwarf
10 // .file directive and the .loc directive.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_MC_MCDWARF_H
15 #define LLVM_MC_MCDWARF_H
16 
17 #include "llvm/ADT/MapVector.h"
18 #include "llvm/ADT/Optional.h"
19 #include "llvm/ADT/SmallVector.h"
20 #include "llvm/ADT/StringMap.h"
21 #include "llvm/ADT/StringRef.h"
23 #include "llvm/Support/Error.h"
24 #include "llvm/Support/MD5.h"
26 #include <cassert>
27 #include <cstdint>
28 #include <string>
29 #include <utility>
30 #include <vector>
31 
32 namespace llvm {
33 
34 template <typename T> class ArrayRef;
35 class MCAsmBackend;
36 class MCContext;
37 class MCObjectStreamer;
38 class MCSection;
39 class MCStreamer;
40 class MCSymbol;
41 class raw_ostream;
42 class SMLoc;
43 class SourceMgr;
44 
45 namespace mcdwarf {
46 // Emit the common part of the DWARF 5 range/locations list tables header.
48 } // namespace mcdwarf
49 
50 /// Manage the .debug_line_str section contents, if we use it.
52  BumpPtrAllocator Alloc;
53  StringSaver Saver{Alloc};
54  MCSymbol *LineStrLabel = nullptr;
56  bool UseRelocs = false;
57 
58 public:
59  /// Construct an instance that can emit .debug_line_str (for use in a normal
60  /// v5 line table).
61  explicit MCDwarfLineStr(MCContext &Ctx);
62 
63  StringSaver &getSaver() { return Saver; }
64 
65  /// Emit a reference to the string.
66  void emitRef(MCStreamer *MCOS, StringRef Path);
67 
68  /// Emit the .debug_line_str section if appropriate.
69  void emitSection(MCStreamer *MCOS);
70 
71  /// Returns finalized section.
73 };
74 
75 /// Instances of this class represent the name of the dwarf .file directive and
76 /// its associated dwarf file number in the MC file. MCDwarfFile's are created
77 /// and uniqued by the MCContext class. In Dwarf 4 file numbers start from 1;
78 /// i.e. the entry with file number 1 is the first element in the vector of
79 /// DwarfFiles and there is no MCDwarfFile with file number 0. In Dwarf 5 file
80 /// numbers start from 0, with the MCDwarfFile with file number 0 being the
81 /// primary source file, and file numbers correspond to their index in the
82 /// vector.
83 struct MCDwarfFile {
84  // The base name of the file without its directory path.
85  std::string Name;
86 
87  // The index into the list of directory names for this file name.
88  unsigned DirIndex = 0;
89 
90  /// The MD5 checksum, if there is one. Non-owning pointer to data allocated
91  /// in MCContext.
93 
94  /// The source code of the file. Non-owning reference to data allocated in
95  /// MCContext.
97 };
98 
99 /// Instances of this class represent the information from a
100 /// dwarf .loc directive.
101 class MCDwarfLoc {
102  uint32_t FileNum;
103  uint32_t Line;
104  uint16_t Column;
105  // Flags (see #define's below)
106  uint8_t Flags;
107  uint8_t Isa;
108  uint32_t Discriminator;
109 
110 // Flag that indicates the initial value of the is_stmt_start flag.
111 #define DWARF2_LINE_DEFAULT_IS_STMT 1
112 
113 #define DWARF2_FLAG_IS_STMT (1 << 0)
114 #define DWARF2_FLAG_BASIC_BLOCK (1 << 1)
115 #define DWARF2_FLAG_PROLOGUE_END (1 << 2)
116 #define DWARF2_FLAG_EPILOGUE_BEGIN (1 << 3)
117 
118 private: // MCContext manages these
119  friend class MCContext;
120  friend class MCDwarfLineEntry;
121 
122  MCDwarfLoc(unsigned fileNum, unsigned line, unsigned column, unsigned flags,
123  unsigned isa, unsigned discriminator)
124  : FileNum(fileNum), Line(line), Column(column), Flags(flags), Isa(isa),
125  Discriminator(discriminator) {}
126 
127  // Allow the default copy constructor and assignment operator to be used
128  // for an MCDwarfLoc object.
129 
130 public:
131  /// Get the FileNum of this MCDwarfLoc.
132  unsigned getFileNum() const { return FileNum; }
133 
134  /// Get the Line of this MCDwarfLoc.
135  unsigned getLine() const { return Line; }
136 
137  /// Get the Column of this MCDwarfLoc.
138  unsigned getColumn() const { return Column; }
139 
140  /// Get the Flags of this MCDwarfLoc.
141  unsigned getFlags() const { return Flags; }
142 
143  /// Get the Isa of this MCDwarfLoc.
144  unsigned getIsa() const { return Isa; }
145 
146  /// Get the Discriminator of this MCDwarfLoc.
147  unsigned getDiscriminator() const { return Discriminator; }
148 
149  /// Set the FileNum of this MCDwarfLoc.
150  void setFileNum(unsigned fileNum) { FileNum = fileNum; }
151 
152  /// Set the Line of this MCDwarfLoc.
153  void setLine(unsigned line) { Line = line; }
154 
155  /// Set the Column of this MCDwarfLoc.
156  void setColumn(unsigned column) {
157  assert(column <= UINT16_MAX);
158  Column = column;
159  }
160 
161  /// Set the Flags of this MCDwarfLoc.
162  void setFlags(unsigned flags) {
163  assert(flags <= UINT8_MAX);
164  Flags = flags;
165  }
166 
167  /// Set the Isa of this MCDwarfLoc.
168  void setIsa(unsigned isa) {
169  assert(isa <= UINT8_MAX);
170  Isa = isa;
171  }
172 
173  /// Set the Discriminator of this MCDwarfLoc.
174  void setDiscriminator(unsigned discriminator) {
175  Discriminator = discriminator;
176  }
177 };
178 
179 /// Instances of this class represent the line information for
180 /// the dwarf line table entries. Which is created after a machine
181 /// instruction is assembled and uses an address from a temporary label
182 /// created at the current address in the current section and the info from
183 /// the last .loc directive seen as stored in the context.
184 class MCDwarfLineEntry : public MCDwarfLoc {
185  MCSymbol *Label;
186 
187 private:
188  // Allow the default copy constructor and assignment operator to be used
189  // for an MCDwarfLineEntry object.
190 
191 public:
192  // Constructor to create an MCDwarfLineEntry given a symbol and the dwarf loc.
194  : MCDwarfLoc(loc), Label(label) {}
195 
196  MCSymbol *getLabel() const { return Label; }
197 
198  // This indicates the line entry is synthesized for an end entry.
199  bool IsEndEntry = false;
200 
201  // Override the label with the given EndLabel.
202  void setEndLabel(MCSymbol *EndLabel) {
203  Label = EndLabel;
204  IsEndEntry = true;
205  }
206 
207  // This is called when an instruction is assembled into the specified
208  // section and if there is information from the last .loc directive that
209  // has yet to have a line entry made for it is made.
210  static void make(MCStreamer *MCOS, MCSection *Section);
211 };
212 
213 /// Instances of this class represent the line information for a compile
214 /// unit where machine instructions have been assembled after seeing .loc
215 /// directives. This is the information used to build the dwarf line
216 /// table for a section.
218 public:
219  // Add an entry to this MCLineSection's line entries.
220  void addLineEntry(const MCDwarfLineEntry &LineEntry, MCSection *Sec) {
221  MCLineDivisions[Sec].push_back(LineEntry);
222  }
223 
224  // Add an end entry by cloning the last entry, if exists, for the section
225  // the given EndLabel belongs to. The label is replaced by the given EndLabel.
226  void addEndEntry(MCSymbol *EndLabel);
227 
228  using MCDwarfLineEntryCollection = std::vector<MCDwarfLineEntry>;
229  using iterator = MCDwarfLineEntryCollection::iterator;
230  using const_iterator = MCDwarfLineEntryCollection::const_iterator;
232 
233 private:
234  // A collection of MCDwarfLineEntry for each section.
235  MCLineDivisionMap MCLineDivisions;
236 
237 public:
238  // Returns the collection of MCDwarfLineEntry for a given Compile Unit ID.
240  return MCLineDivisions;
241  }
242 };
243 
245  /// First special line opcode - leave room for the standard opcodes.
246  /// Note: If you want to change this, you'll have to update the
247  /// "StandardOpcodeLengths" table that is emitted in
248  /// \c Emit().
249  uint8_t DWARF2LineOpcodeBase = 13;
250  /// Minimum line offset in a special line info. opcode. The value
251  /// -5 was chosen to give a reasonable range of values.
252  int8_t DWARF2LineBase = -5;
253  /// Range of line offsets in a special line info. opcode.
254  uint8_t DWARF2LineRange = 14;
255 };
256 
258  MCSymbol *Label = nullptr;
262  std::string CompilationDir;
264  bool HasSource = false;
265 private:
266  bool HasAllMD5 = true;
267  bool HasAnyMD5 = false;
268 
269 public:
270  MCDwarfLineTableHeader() = default;
271 
272  Expected<unsigned> tryGetFile(StringRef &Directory, StringRef &FileName,
273  Optional<MD5::MD5Result> Checksum,
275  uint16_t DwarfVersion,
276  unsigned FileNumber = 0);
277  std::pair<MCSymbol *, MCSymbol *>
278  Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
279  Optional<MCDwarfLineStr> &LineStr) const;
280  std::pair<MCSymbol *, MCSymbol *>
281  Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
282  ArrayRef<char> SpecialOpcodeLengths,
283  Optional<MCDwarfLineStr> &LineStr) const;
284  void resetMD5Usage() {
285  HasAllMD5 = true;
286  HasAnyMD5 = false;
287  }
288  void trackMD5Usage(bool MD5Used) {
289  HasAllMD5 &= MD5Used;
290  HasAnyMD5 |= MD5Used;
291  }
292  bool isMD5UsageConsistent() const {
293  return MCDwarfFiles.empty() || (HasAllMD5 == HasAnyMD5);
294  }
295 
296  void setRootFile(StringRef Directory, StringRef FileName,
297  Optional<MD5::MD5Result> Checksum,
299  CompilationDir = std::string(Directory);
300  RootFile.Name = std::string(FileName);
301  RootFile.DirIndex = 0;
302  RootFile.Checksum = Checksum;
304  trackMD5Usage(Checksum.has_value());
305  HasSource = Source.has_value();
306  }
307 
308  void resetFileTable() {
309  MCDwarfDirs.clear();
310  MCDwarfFiles.clear();
311  RootFile.Name.clear();
312  resetMD5Usage();
313  HasSource = false;
314  }
315 
316 private:
317  void emitV2FileDirTables(MCStreamer *MCOS) const;
318  void emitV5FileDirTables(MCStreamer *MCOS, Optional<MCDwarfLineStr> &LineStr) const;
319 };
320 
322  MCDwarfLineTableHeader Header;
323  bool HasSplitLineTable = false;
324 
325 public:
326  void maybeSetRootFile(StringRef Directory, StringRef FileName,
327  Optional<MD5::MD5Result> Checksum,
329  if (!Header.RootFile.Name.empty())
330  return;
331  Header.setRootFile(Directory, FileName, Checksum, Source);
332  }
333 
334  unsigned getFile(StringRef Directory, StringRef FileName,
335  Optional<MD5::MD5Result> Checksum, uint16_t DwarfVersion,
337  HasSplitLineTable = true;
338  return cantFail(Header.tryGetFile(Directory, FileName, Checksum, Source,
339  DwarfVersion));
340  }
341 
342  void Emit(MCStreamer &MCOS, MCDwarfLineTableParams Params,
343  MCSection *Section) const;
344 };
345 
347  MCDwarfLineTableHeader Header;
348  MCLineSection MCLineSections;
349 
350 public:
351  // This emits the Dwarf file and the line tables for all Compile Units.
352  static void emit(MCStreamer *MCOS, MCDwarfLineTableParams Params);
353 
354  // This emits the Dwarf file and the line tables for a given Compile Unit.
355  void emitCU(MCStreamer *MCOS, MCDwarfLineTableParams Params,
356  Optional<MCDwarfLineStr> &LineStr) const;
357 
358  // This emits a single line table associated with a given Section.
359  static void
360  emitOne(MCStreamer *MCOS, MCSection *Section,
361  const MCLineSection::MCDwarfLineEntryCollection &LineEntries);
362 
363  Expected<unsigned> tryGetFile(StringRef &Directory, StringRef &FileName,
364  Optional<MD5::MD5Result> Checksum,
366  uint16_t DwarfVersion,
367  unsigned FileNumber = 0);
368  unsigned getFile(StringRef &Directory, StringRef &FileName,
370  uint16_t DwarfVersion, unsigned FileNumber = 0) {
371  return cantFail(tryGetFile(Directory, FileName, Checksum, Source,
372  DwarfVersion, FileNumber));
373  }
374 
375  void setRootFile(StringRef Directory, StringRef FileName,
377  Header.CompilationDir = std::string(Directory);
378  Header.RootFile.Name = std::string(FileName);
379  Header.RootFile.DirIndex = 0;
380  Header.RootFile.Checksum = Checksum;
381  Header.RootFile.Source = Source;
382  Header.trackMD5Usage(Checksum.has_value());
383  Header.HasSource = Source.has_value();
384  }
385 
386  void resetFileTable() { Header.resetFileTable(); }
387 
388  bool hasRootFile() const { return !Header.RootFile.Name.empty(); }
389 
390  MCDwarfFile &getRootFile() { return Header.RootFile; }
391  const MCDwarfFile &getRootFile() const { return Header.RootFile; }
392 
393  // Report whether MD5 usage has been consistent (all-or-none).
394  bool isMD5UsageConsistent() const { return Header.isMD5UsageConsistent(); }
395 
396  MCSymbol *getLabel() const {
397  return Header.Label;
398  }
399 
400  void setLabel(MCSymbol *Label) {
401  Header.Label = Label;
402  }
403 
405  return Header.MCDwarfDirs;
406  }
407 
409  return Header.MCDwarfDirs;
410  }
411 
413  return Header.MCDwarfFiles;
414  }
415 
417  return Header.MCDwarfFiles;
418  }
419 
421  return MCLineSections;
422  }
424  return MCLineSections;
425  }
426 };
427 
429 public:
430  /// Utility function to encode a Dwarf pair of LineDelta and AddrDeltas.
431  static void Encode(MCContext &Context, MCDwarfLineTableParams Params,
432  int64_t LineDelta, uint64_t AddrDelta, raw_ostream &OS);
433 
434  /// Utility function to emit the encoding to a streamer.
435  static void Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
436  int64_t LineDelta, uint64_t AddrDelta);
437 };
438 
440 public:
441  //
442  // When generating dwarf for assembly source files this emits the Dwarf
443  // sections.
444  //
445  static void Emit(MCStreamer *MCOS);
446 };
447 
448 // When generating dwarf for assembly source files this is the info that is
449 // needed to be gathered for each symbol that will have a dwarf label.
451 private:
452  // Name of the symbol without a leading underbar, if any.
453  StringRef Name;
454  // The dwarf file number this symbol is in.
455  unsigned FileNumber;
456  // The line number this symbol is at.
457  unsigned LineNumber;
458  // The low_pc for the dwarf label is taken from this symbol.
459  MCSymbol *Label;
460 
461 public:
462  MCGenDwarfLabelEntry(StringRef name, unsigned fileNumber, unsigned lineNumber,
463  MCSymbol *label)
464  : Name(name), FileNumber(fileNumber), LineNumber(lineNumber),
465  Label(label) {}
466 
467  StringRef getName() const { return Name; }
468  unsigned getFileNumber() const { return FileNumber; }
469  unsigned getLineNumber() const { return LineNumber; }
470  MCSymbol *getLabel() const { return Label; }
471 
472  // This is called when label is created when we are generating dwarf for
473  // assembly source files.
474  static void Make(MCSymbol *Symbol, MCStreamer *MCOS, SourceMgr &SrcMgr,
475  SMLoc &Loc);
476 };
477 
479 public:
480  enum OpType {
498  };
499 
500 private:
501  OpType Operation;
502  MCSymbol *Label;
503  unsigned Register;
504  union {
505  int Offset;
506  unsigned Register2;
507  };
508  unsigned AddressSpace;
509  std::vector<char> Values;
510  std::string Comment;
511 
512  MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V,
513  StringRef Comment = "")
514  : Operation(Op), Label(L), Register(R), Offset(O),
515  Values(V.begin(), V.end()), Comment(Comment) {
517  }
518 
519  MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R1, unsigned R2)
520  : Operation(Op), Label(L), Register(R1), Register2(R2) {
521  assert(Op == OpRegister);
522  }
523 
524  MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, unsigned AS)
525  : Operation(Op), Label(L), Register(R), Offset(O), AddressSpace(AS) {
527  }
528 
529 public:
530  /// .cfi_def_cfa defines a rule for computing CFA as: take address from
531  /// Register and add Offset to it.
533  int Offset) {
534  return MCCFIInstruction(OpDefCfa, L, Register, Offset, "");
535  }
536 
537  /// .cfi_def_cfa_register modifies a rule for computing CFA. From now
538  /// on Register will be used instead of the old one. Offset remains the same.
540  return MCCFIInstruction(OpDefCfaRegister, L, Register, 0, "");
541  }
542 
543  /// .cfi_def_cfa_offset modifies a rule for computing CFA. Register
544  /// remains the same, but offset is new. Note that it is the absolute offset
545  /// that will be added to a defined register to the compute CFA address.
547  return MCCFIInstruction(OpDefCfaOffset, L, 0, Offset, "");
548  }
549 
550  /// .cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but
551  /// Offset is a relative value that is added/subtracted from the previous
552  /// offset.
553  static MCCFIInstruction createAdjustCfaOffset(MCSymbol *L, int Adjustment) {
554  return MCCFIInstruction(OpAdjustCfaOffset, L, 0, Adjustment, "");
555  }
556 
557  // FIXME: Update the remaining docs to use the new proposal wording.
558  /// .cfi_llvm_def_aspace_cfa defines the rule for computing the CFA to
559  /// be the result of evaluating the DWARF operation expression
560  /// `DW_OP_constu AS; DW_OP_aspace_bregx R, B` as a location description.
562  int Offset,
563  unsigned AddressSpace) {
565  AddressSpace);
566  }
567 
568  /// .cfi_offset Previous value of Register is saved at offset Offset
569  /// from CFA.
571  int Offset) {
572  return MCCFIInstruction(OpOffset, L, Register, Offset, "");
573  }
574 
575  /// .cfi_rel_offset Previous value of Register is saved at offset
576  /// Offset from the current CFA register. This is transformed to .cfi_offset
577  /// using the known displacement of the CFA register from the CFA.
579  int Offset) {
580  return MCCFIInstruction(OpRelOffset, L, Register, Offset, "");
581  }
582 
583  /// .cfi_register Previous value of Register1 is saved in
584  /// register Register2.
585  static MCCFIInstruction createRegister(MCSymbol *L, unsigned Register1,
586  unsigned Register2) {
587  return MCCFIInstruction(OpRegister, L, Register1, Register2);
588  }
589 
590  /// .cfi_window_save SPARC register window is saved.
592  return MCCFIInstruction(OpWindowSave, L, 0, 0, "");
593  }
594 
595  /// .cfi_negate_ra_state AArch64 negate RA state.
597  return MCCFIInstruction(OpNegateRAState, L, 0, 0, "");
598  }
599 
600  /// .cfi_restore says that the rule for Register is now the same as it
601  /// was at the beginning of the function, after all initial instructions added
602  /// by .cfi_startproc were executed.
604  return MCCFIInstruction(OpRestore, L, Register, 0, "");
605  }
606 
607  /// .cfi_undefined From now on the previous value of Register can't be
608  /// restored anymore.
610  return MCCFIInstruction(OpUndefined, L, Register, 0, "");
611  }
612 
613  /// .cfi_same_value Current value of Register is the same as in the
614  /// previous frame. I.e., no restoration is needed.
616  return MCCFIInstruction(OpSameValue, L, Register, 0, "");
617  }
618 
619  /// .cfi_remember_state Save all current rules for all registers.
621  return MCCFIInstruction(OpRememberState, L, 0, 0, "");
622  }
623 
624  /// .cfi_restore_state Restore the previously saved state.
626  return MCCFIInstruction(OpRestoreState, L, 0, 0, "");
627  }
628 
629  /// .cfi_escape Allows the user to add arbitrary bytes to the unwind
630  /// info.
632  StringRef Comment = "") {
633  return MCCFIInstruction(OpEscape, L, 0, 0, Vals, Comment);
634  }
635 
636  /// A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE
638  return MCCFIInstruction(OpGnuArgsSize, L, 0, Size, "");
639  }
640 
641  OpType getOperation() const { return Operation; }
642  MCSymbol *getLabel() const { return Label; }
643 
644  unsigned getRegister() const {
650  return Register;
651  }
652 
653  unsigned getRegister2() const {
655  return Register2;
656  }
657 
658  unsigned getAddressSpace() const {
660  return AddressSpace;
661  }
662 
663  int getOffset() const {
668  return Offset;
669  }
670 
673  return StringRef(&Values[0], Values.size());
674  }
675 
677  return Comment;
678  }
679 };
680 
682  MCDwarfFrameInfo() = default;
683 
684  MCSymbol *Begin = nullptr;
685  MCSymbol *End = nullptr;
686  const MCSymbol *Personality = nullptr;
687  const MCSymbol *Lsda = nullptr;
688  std::vector<MCCFIInstruction> Instructions;
689  unsigned CurrentCfaRegister = 0;
690  unsigned PersonalityEncoding = 0;
691  unsigned LsdaEncoding = 0;
693  bool IsSignalFrame = false;
694  bool IsSimple = false;
695  unsigned RAReg = static_cast<unsigned>(INT_MAX);
696  bool IsBKeyFrame = false;
697  bool IsMTETaggedFrame = false;
698 };
699 
701 public:
702  //
703  // This emits the frame info section.
704  //
705  static void Emit(MCObjectStreamer &streamer, MCAsmBackend *MAB, bool isEH);
706  static void EmitAdvanceLoc(MCObjectStreamer &Streamer, uint64_t AddrDelta);
707  static void EncodeAdvanceLoc(MCContext &Context, uint64_t AddrDelta,
708  raw_ostream &OS);
709 };
710 
711 } // end namespace llvm
712 
713 #endif // LLVM_MC_MCDWARF_H
llvm::MCDwarfLineTable::tryGetFile
Expected< unsigned > tryGetFile(StringRef &Directory, StringRef &FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, uint16_t DwarfVersion, unsigned FileNumber=0)
Definition: MCDwarf.cpp:562
llvm::MCCFIInstruction::OpWindowSave
@ OpWindowSave
Definition: MCDwarf.h:495
llvm::MCDwarfFrameInfo::End
MCSymbol * End
Definition: MCDwarf.h:685
llvm::MCDwarfLoc::getColumn
unsigned getColumn() const
Get the Column of this MCDwarfLoc.
Definition: MCDwarf.h:138
llvm::MCDwarfLineEntry::IsEndEntry
bool IsEndEntry
Definition: MCDwarf.h:199
llvm::MCGenDwarfInfo
Definition: MCDwarf.h:439
llvm::MCDwarfLineTableParams::DWARF2LineRange
uint8_t DWARF2LineRange
Range of line offsets in a special line info. opcode.
Definition: MCDwarf.h:254
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MCDwarfLineTable::emitOne
static void emitOne(MCStreamer *MCOS, MCSection *Section, const MCLineSection::MCDwarfLineEntryCollection &LineEntries)
Definition: MCDwarf.cpp:166
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCCFIInstruction::OpRelOffset
@ OpRelOffset
Definition: MCDwarf.h:489
Optional.h
llvm::MCDwarfLineTableParams::DWARF2LineOpcodeBase
uint8_t DWARF2LineOpcodeBase
First special line opcode - leave room for the standard opcodes.
Definition: MCDwarf.h:249
llvm::MCCFIInstruction::OpDefCfaRegister
@ OpDefCfaRegister
Definition: MCDwarf.h:486
llvm::MCCFIInstruction::getComment
StringRef getComment() const
Definition: MCDwarf.h:676
llvm::MCDwarfLineStr::getSaver
StringSaver & getSaver()
Definition: MCDwarf.h:63
llvm::MCDwarfLoc::setIsa
void setIsa(unsigned isa)
Set the Isa of this MCDwarfLoc.
Definition: MCDwarf.h:168
llvm::MCDwarfLoc::setFileNum
void setFileNum(unsigned fileNum)
Set the FileNum of this MCDwarfLoc.
Definition: MCDwarf.h:150
llvm::MCDwarfLoc::getLine
unsigned getLine() const
Get the Line of this MCDwarfLoc.
Definition: MCDwarf.h:135
llvm::MCDwarfFrameInfo::Lsda
const MCSymbol * Lsda
Definition: MCDwarf.h:687
llvm::isa
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
Definition: Casting.h:548
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
llvm::MCDwarfFrameInfo::Begin
MCSymbol * Begin
Definition: MCDwarf.h:684
StringRef.h
llvm::MCCFIInstruction::OpOffset
@ OpOffset
Definition: MCDwarf.h:484
llvm::MCGenDwarfLabelEntry::getLabel
MCSymbol * getLabel() const
Definition: MCDwarf.h:470
llvm::SmallVector< std::string, 3 >
llvm::MCDwarfLineTableHeader::isMD5UsageConsistent
bool isMD5UsageConsistent() const
Definition: MCDwarf.h:292
llvm::MCLineSection::const_iterator
MCDwarfLineEntryCollection::const_iterator const_iterator
Definition: MCDwarf.h:230
MapVector.h
llvm::MCDwarfLineTableHeader::MCDwarfFiles
SmallVector< MCDwarfFile, 3 > MCDwarfFiles
Definition: MCDwarf.h:260
Error.h
llvm::MCGenDwarfLabelEntry::MCGenDwarfLabelEntry
MCGenDwarfLabelEntry(StringRef name, unsigned fileNumber, unsigned lineNumber, MCSymbol *label)
Definition: MCDwarf.h:462
llvm::MCDwarfLineTableHeader::tryGetFile
Expected< unsigned > tryGetFile(StringRef &Directory, StringRef &FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, uint16_t DwarfVersion, unsigned FileNumber=0)
Definition: MCDwarf.cpp:580
llvm::MCCFIInstruction::createRelOffset
static MCCFIInstruction createRelOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_rel_offset Previous value of Register is saved at offset Offset from the current CFA register.
Definition: MCDwarf.h:578
llvm::MCDwarfLineTableHeader::trackMD5Usage
void trackMD5Usage(bool MD5Used)
Definition: MCDwarf.h:288
llvm::sys::path::end
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:235
llvm::sys::path::begin
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
Definition: Path.cpp:226
llvm::MCDwarfLineTableHeader::Emit
std::pair< MCSymbol *, MCSymbol * > Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params, Optional< MCDwarfLineStr > &LineStr) const
Definition: MCDwarf.cpp:293
llvm::MCDwarfFrameEmitter::EncodeAdvanceLoc
static void EncodeAdvanceLoc(MCContext &Context, uint64_t AddrDelta, raw_ostream &OS)
Definition: MCDwarf.cpp:1925
llvm::Optional
Definition: APInt.h:33
llvm::MapVector< MCSection *, MCDwarfLineEntryCollection >
llvm::MCDwarfFrameInfo::RAReg
unsigned RAReg
Definition: MCDwarf.h:695
llvm::MCDwarfLineTableHeader::RootFile
MCDwarfFile RootFile
Definition: MCDwarf.h:263
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::MCDwarfFile::Checksum
Optional< MD5::MD5Result > Checksum
The MD5 checksum, if there is one.
Definition: MCDwarf.h:92
llvm::MCDwarfFrameInfo::MCDwarfFrameInfo
MCDwarfFrameInfo()=default
llvm::MCDwarfFile::Name
std::string Name
Definition: MCDwarf.h:85
llvm::MCDwarfLoc::setColumn
void setColumn(unsigned column)
Set the Column of this MCDwarfLoc.
Definition: MCDwarf.h:156
llvm::MCCFIInstruction::createSameValue
static MCCFIInstruction createSameValue(MCSymbol *L, unsigned Register)
.cfi_same_value Current value of Register is the same as in the previous frame.
Definition: MCDwarf.h:615
llvm::MCDwarfLineEntry::setEndLabel
void setEndLabel(MCSymbol *EndLabel)
Definition: MCDwarf.h:202
llvm::MCCFIInstruction::createLLVMDefAspaceCfa
static MCCFIInstruction createLLVMDefAspaceCfa(MCSymbol *L, unsigned Register, int Offset, unsigned AddressSpace)
.cfi_llvm_def_aspace_cfa defines the rule for computing the CFA to be the result of evaluating the DW...
Definition: MCDwarf.h:561
llvm::MCDwarfLoc::getDiscriminator
unsigned getDiscriminator() const
Get the Discriminator of this MCDwarfLoc.
Definition: MCDwarf.h:147
llvm::RISCVFenceField::R
@ R
Definition: RISCVBaseInfo.h:265
llvm::MCCFIInstruction::cfiDefCfaOffset
static MCCFIInstruction cfiDefCfaOffset(MCSymbol *L, int Offset)
.cfi_def_cfa_offset modifies a rule for computing CFA.
Definition: MCDwarf.h:546
llvm::MCDwarfLineTable::setRootFile
void setRootFile(StringRef Directory, StringRef FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source)
Definition: MCDwarf.h:375
llvm::MCGenDwarfLabelEntry
Definition: MCDwarf.h:450
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::MCCFIInstruction::OpDefCfa
@ OpDefCfa
Definition: MCDwarf.h:488
llvm::MCDwarfLoc::setFlags
void setFlags(unsigned flags)
Set the Flags of this MCDwarfLoc.
Definition: MCDwarf.h:162
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:212
R2
#define R2(n)
llvm::MCDwarfLineStr::emitSection
void emitSection(MCStreamer *MCOS)
Emit the .debug_line_str section if appropriate.
Definition: MCDwarf.cpp:333
StringTableBuilder.h
llvm::MCCFIInstruction::OpUndefined
@ OpUndefined
Definition: MCDwarf.h:493
llvm::MCDwarfLoc::setDiscriminator
void setDiscriminator(unsigned discriminator)
Set the Discriminator of this MCDwarfLoc.
Definition: MCDwarf.h:174
llvm::MCGenDwarfInfo::Emit
static void Emit(MCStreamer *MCOS)
Definition: MCDwarf.cpp:1138
llvm::MCDwarfLoc::setLine
void setLine(unsigned line)
Set the Line of this MCDwarfLoc.
Definition: MCDwarf.h:153
llvm::MCAsmBackend
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:42
llvm::MCDwarfFrameInfo::CurrentCfaRegister
unsigned CurrentCfaRegister
Definition: MCDwarf.h:689
llvm::SMLoc
Represents a location in source code.
Definition: SMLoc.h:23
llvm::MCDwarfLineStr
Manage the .debug_line_str section contents, if we use it.
Definition: MCDwarf.h:51
MD5.h
Operation
PowerPC Reduce CR logical Operation
Definition: PPCReduceCRLogicals.cpp:734
llvm::MCLineSection
Instances of this class represent the line information for a compile unit where machine instructions ...
Definition: MCDwarf.h:217
llvm::MCDwarfLineTableParams
Definition: MCDwarf.h:244
llvm::MCDwarfFrameInfo::Personality
const MCSymbol * Personality
Definition: MCDwarf.h:686
llvm::SrcMgr
SourceMgr SrcMgr
Definition: Error.cpp:24
llvm::MCDwarfLineTable::emitCU
void emitCU(MCStreamer *MCOS, MCDwarfLineTableParams Params, Optional< MCDwarfLineStr > &LineStr) const
Definition: MCDwarf.cpp:549
llvm::MCDwarfLineTableHeader::MCDwarfDirs
SmallVector< std::string, 3 > MCDwarfDirs
Definition: MCDwarf.h:259
llvm::MCDwarfLineTableHeader::HasSource
bool HasSource
Definition: MCDwarf.h:264
llvm::MCCFIInstruction::getOffset
int getOffset() const
Definition: MCDwarf.h:663
llvm::MCObjectStreamer
Streaming object file generation interface.
Definition: MCObjectStreamer.h:42
llvm::MCDwarfLineTable
Definition: MCDwarf.h:346
llvm::MCDwarfLineTable::emit
static void emit(MCStreamer *MCOS, MCDwarfLineTableParams Params)
Definition: MCDwarf.cpp:256
llvm::MCCFIInstruction::createRestoreState
static MCCFIInstruction createRestoreState(MCSymbol *L)
.cfi_restore_state Restore the previously saved state.
Definition: MCDwarf.h:625
llvm::MCLineSection::getMCLineEntries
const MCLineDivisionMap & getMCLineEntries() const
Definition: MCDwarf.h:239
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
llvm::MCCFIInstruction::getOperation
OpType getOperation() const
Definition: MCDwarf.h:641
llvm::MCDwarfFrameEmitter::Emit
static void Emit(MCObjectStreamer &streamer, MCAsmBackend *MAB, bool isEH)
Definition: MCDwarf.cpp:1848
llvm::MCLineSection::MCDwarfLineEntryCollection
std::vector< MCDwarfLineEntry > MCDwarfLineEntryCollection
Definition: MCDwarf.h:228
llvm::MCCFIInstruction::createEscape
static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals, StringRef Comment="")
.cfi_escape Allows the user to add arbitrary bytes to the unwind info.
Definition: MCDwarf.h:631
llvm::AddressSpace
AddressSpace
Definition: NVPTXBaseInfo.h:21
llvm::MCCFIInstruction::getRegister
unsigned getRegister() const
Definition: MCDwarf.h:644
llvm::MCDwarfLineTable::getLabel
MCSymbol * getLabel() const
Definition: MCDwarf.h:396
llvm::MCCFIInstruction
Definition: MCDwarf.h:478
llvm::MCCFIInstruction::createDefCfaRegister
static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register)
.cfi_def_cfa_register modifies a rule for computing CFA.
Definition: MCDwarf.h:539
llvm::MCDwarfLineTable::getMCDwarfDirs
SmallVectorImpl< std::string > & getMCDwarfDirs()
Definition: MCDwarf.h:408
llvm::StringMap< unsigned >
llvm::SmallString< 0 >
llvm::MCDwarfLineTableParams::DWARF2LineBase
int8_t DWARF2LineBase
Minimum line offset in a special line info.
Definition: MCDwarf.h:252
llvm::MCDwarfLineTable::getMCLineSections
const MCLineSection & getMCLineSections() const
Definition: MCDwarf.h:420
llvm::MCGenDwarfLabelEntry::Make
static void Make(MCSymbol *Symbol, MCStreamer *MCOS, SourceMgr &SrcMgr, SMLoc &Loc)
Definition: MCDwarf.cpp:1201
llvm::MCDwarfLineAddr::Encode
static void Encode(MCContext &Context, MCDwarfLineTableParams Params, int64_t LineDelta, uint64_t AddrDelta, raw_ostream &OS)
Utility function to encode a Dwarf pair of LineDelta and AddrDeltas.
Definition: MCDwarf.cpp:685
StringSaver.h
llvm::MCDwarfLoc::getIsa
unsigned getIsa() const
Get the Isa of this MCDwarfLoc.
Definition: MCDwarf.h:144
llvm::MCDwarfLineTable::getFile
unsigned getFile(StringRef &Directory, StringRef &FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, uint16_t DwarfVersion, unsigned FileNumber=0)
Definition: MCDwarf.h:368
llvm::MCDwarfLineTable::getRootFile
const MCDwarfFile & getRootFile() const
Definition: MCDwarf.h:391
llvm::ISD::Register
@ Register
Definition: ISDOpcodes.h:74
llvm::RISCVFenceField::O
@ O
Definition: RISCVBaseInfo.h:264
llvm::MCCFIInstruction::OpDefCfaOffset
@ OpDefCfaOffset
Definition: MCDwarf.h:487
llvm::MCCFIInstruction::OpRestore
@ OpRestore
Definition: MCDwarf.h:492
uint64_t
llvm::MCDwarfLineAddr::Emit
static void Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params, int64_t LineDelta, uint64_t AddrDelta)
Utility function to emit the encoding to a streamer.
Definition: MCDwarf.cpp:669
llvm::MCCFIInstruction::createGnuArgsSize
static MCCFIInstruction createGnuArgsSize(MCSymbol *L, int Size)
A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE.
Definition: MCDwarf.h:637
llvm::MCCFIInstruction::OpSameValue
@ OpSameValue
Definition: MCDwarf.h:481
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:63
llvm::MCDwarfLineTable::setLabel
void setLabel(MCSymbol *Label)
Definition: MCDwarf.h:400
llvm::MCCFIInstruction::createNegateRAState
static MCCFIInstruction createNegateRAState(MCSymbol *L)
.cfi_negate_ra_state AArch64 negate RA state.
Definition: MCDwarf.h:596
llvm::MCDwarfLineTableHeader::CompilationDir
std::string CompilationDir
Definition: MCDwarf.h:262
llvm::MCCFIInstruction::OpType
OpType
Definition: MCDwarf.h:480
llvm::MCDwarfFile
Instances of this class represent the name of the dwarf .file directive and its associated dwarf file...
Definition: MCDwarf.h:83
llvm::MCDwarfLineTable::getRootFile
MCDwarfFile & getRootFile()
Definition: MCDwarf.h:390
llvm::MCGenDwarfLabelEntry::getLineNumber
unsigned getLineNumber() const
Definition: MCDwarf.h:469
llvm::MCLineSection::iterator
MCDwarfLineEntryCollection::iterator iterator
Definition: MCDwarf.h:229
llvm::MCCFIInstruction::getRegister2
unsigned getRegister2() const
Definition: MCDwarf.h:653
llvm::MCDwarfFrameEmitter
Definition: MCDwarf.h:700
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MCDwarfLineTable::getMCDwarfFiles
SmallVectorImpl< MCDwarfFile > & getMCDwarfFiles()
Definition: MCDwarf.h:416
llvm::MCGenDwarfLabelEntry::getName
StringRef getName() const
Definition: MCDwarf.h:467
llvm::MCDwarfLineTableHeader::setRootFile
void setRootFile(StringRef Directory, StringRef FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source)
Definition: MCDwarf.h:296
llvm::MCCFIInstruction::cfiDefCfa
static MCCFIInstruction cfiDefCfa(MCSymbol *L, unsigned Register, int Offset)
.cfi_def_cfa defines a rule for computing CFA as: take address from Register and add Offset to it.
Definition: MCDwarf.h:532
llvm::MCCFIInstruction::OpAdjustCfaOffset
@ OpAdjustCfaOffset
Definition: MCDwarf.h:490
llvm::MCDwarfLineTable::getMCDwarfFiles
const SmallVectorImpl< MCDwarfFile > & getMCDwarfFiles() const
Definition: MCDwarf.h:412
llvm::MCCFIInstruction::Register2
unsigned Register2
Definition: MCDwarf.h:506
llvm::mcdwarf::emitListsTableHeaderStart
MCSymbol * emitListsTableHeaderStart(MCStreamer &S)
Definition: MCDwarf.cpp:47
llvm::StringSaver
Saves strings in the provided stable storage and returns a StringRef with a stable character pointer.
Definition: StringSaver.h:21
llvm::MCCFIInstruction::OpEscape
@ OpEscape
Definition: MCDwarf.h:491
llvm::MCDwarfLineEntry::MCDwarfLineEntry
MCDwarfLineEntry(MCSymbol *label, const MCDwarfLoc loc)
Definition: MCDwarf.h:193
llvm::Sched::Source
@ Source
Definition: TargetLowering.h:98
llvm::ArrayRef< char >
llvm::MCDwarfLoc
Instances of this class represent the information from a dwarf .loc directive.
Definition: MCDwarf.h:101
llvm::MCCFIInstruction::getAddressSpace
unsigned getAddressSpace() const
Definition: MCDwarf.h:658
llvm::MCCFIInstruction::OpRememberState
@ OpRememberState
Definition: MCDwarf.h:482
llvm::StringTableBuilder::DWARF
@ DWARF
Definition: StringTableBuilder.h:33
llvm::MCDwarfDwoLineTable
Definition: MCDwarf.h:321
llvm::MCDwarfLineStr::MCDwarfLineStr
MCDwarfLineStr(MCContext &Ctx)
Construct an instance that can emit .debug_line_str (for use in a normal v5 line table).
Definition: MCDwarf.cpp:79
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::MCCFIInstruction::getValues
StringRef getValues() const
Definition: MCDwarf.h:671
llvm::MCDwarfLineEntry::make
static void make(MCStreamer *MCOS, MCSection *Section)
Definition: MCDwarf.cpp:91
llvm::MCGenDwarfLabelEntry::getFileNumber
unsigned getFileNumber() const
Definition: MCDwarf.h:468
llvm::cantFail
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Definition: Error.h:745
llvm::SourceMgr
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
Definition: SourceMgr.h:31
llvm::MCDwarfLineTableHeader::Label
MCSymbol * Label
Definition: MCDwarf.h:258
uint32_t
llvm::MCCFIInstruction::OpLLVMDefAspaceCfa
@ OpLLVMDefAspaceCfa
Definition: MCDwarf.h:485
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::MCDwarfFrameInfo::CompactUnwindEncoding
uint32_t CompactUnwindEncoding
Definition: MCDwarf.h:692
llvm::MCCFIInstruction::createAdjustCfaOffset
static MCCFIInstruction createAdjustCfaOffset(MCSymbol *L, int Adjustment)
.cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but Offset is a relative value that is added/subt...
Definition: MCDwarf.h:553
llvm::Optional::has_value
constexpr bool has_value() const
Definition: Optional.h:324
llvm::MCDwarfLineTableHeader::MCDwarfLineTableHeader
MCDwarfLineTableHeader()=default
llvm::MCDwarfFile::DirIndex
unsigned DirIndex
Definition: MCDwarf.h:88
llvm::MCDwarfLineStr::emitRef
void emitRef(MCStreamer *MCOS, StringRef Path)
Emit a reference to the string.
Definition: MCDwarf.cpp:351
llvm::MCDwarfDwoLineTable::maybeSetRootFile
void maybeSetRootFile(StringRef Directory, StringRef FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source)
Definition: MCDwarf.h:326
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::MCDwarfLineTableHeader::SourceIdMap
StringMap< unsigned > SourceIdMap
Definition: MCDwarf.h:261
llvm::MCDwarfDwoLineTable::Emit
void Emit(MCStreamer &MCOS, MCDwarfLineTableParams Params, MCSection *Section) const
Definition: MCDwarf.cpp:283
llvm::MCDwarfFrameInfo::IsBKeyFrame
bool IsBKeyFrame
Definition: MCDwarf.h:696
llvm::MCDwarfFrameInfo::PersonalityEncoding
unsigned PersonalityEncoding
Definition: MCDwarf.h:690
name
static const char * name
Definition: SVEIntrinsicOpts.cpp:74
llvm::MCLineSection::addLineEntry
void addLineEntry(const MCDwarfLineEntry &LineEntry, MCSection *Sec)
Definition: MCDwarf.h:220
llvm::MCDwarfLoc::getFlags
unsigned getFlags() const
Get the Flags of this MCDwarfLoc.
Definition: MCDwarf.h:141
llvm::pdb::PDB_SymType::Label
@ Label
llvm::omp::AddressSpace
AddressSpace
Definition: OMPConstants.h:196
uint16_t
llvm::AMDGPU::SendMsg::Op
Op
Definition: SIDefines.h:348
llvm::MCDwarfLineTableHeader::resetFileTable
void resetFileTable()
Definition: MCDwarf.h:308
llvm::MCCFIInstruction::OpGnuArgsSize
@ OpGnuArgsSize
Definition: MCDwarf.h:497
llvm::MCDwarfLineTable::resetFileTable
void resetFileTable()
Definition: MCDwarf.h:386
llvm::MCDwarfFrameInfo::IsSignalFrame
bool IsSignalFrame
Definition: MCDwarf.h:693
llvm::MCDwarfDwoLineTable::getFile
unsigned getFile(StringRef Directory, StringRef FileName, Optional< MD5::MD5Result > Checksum, uint16_t DwarfVersion, Optional< StringRef > Source)
Definition: MCDwarf.h:334
llvm::MCDwarfFile::Source
Optional< StringRef > Source
The source code of the file.
Definition: MCDwarf.h:96
llvm::StringTableBuilder
Utility for building string tables with deduplicated suffixes.
Definition: StringTableBuilder.h:23
llvm::SmallVectorImpl::clear
void clear()
Definition: SmallVector.h:597
llvm::MCDwarfLoc::getFileNum
unsigned getFileNum() const
Get the FileNum of this MCDwarfLoc.
Definition: MCDwarf.h:132
llvm::MCDwarfLineTableHeader
Definition: MCDwarf.h:257
llvm::MCCFIInstruction::OpRegister
@ OpRegister
Definition: MCDwarf.h:494
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::MCDwarfLineTable::isMD5UsageConsistent
bool isMD5UsageConsistent() const
Definition: MCDwarf.h:394
llvm::MCDwarfLineTable::getMCLineSections
MCLineSection & getMCLineSections()
Definition: MCDwarf.h:423
llvm::MCLineSection::addEndEntry
void addEndEntry(MCSymbol *EndLabel)
Definition: MCDwarf.cpp:144
llvm::MCDwarfLineTable::getMCDwarfDirs
const SmallVectorImpl< std::string > & getMCDwarfDirs() const
Definition: MCDwarf.h:404
llvm::MCDwarfLineEntry::getLabel
MCSymbol * getLabel() const
Definition: MCDwarf.h:196
llvm::MCCFIInstruction::Offset
int Offset
Definition: MCDwarf.h:505
llvm::MCDwarfFrameInfo::Instructions
std::vector< MCCFIInstruction > Instructions
Definition: MCDwarf.h:688
llvm::MCCFIInstruction::createRegister
static MCCFIInstruction createRegister(MCSymbol *L, unsigned Register1, unsigned Register2)
.cfi_register Previous value of Register1 is saved in register Register2.
Definition: MCDwarf.h:585
llvm::MCDwarfFrameInfo::LsdaEncoding
unsigned LsdaEncoding
Definition: MCDwarf.h:691
SmallVector.h
llvm::MCCFIInstruction::createUndefined
static MCCFIInstruction createUndefined(MCSymbol *L, unsigned Register)
.cfi_undefined From now on the previous value of Register can't be restored anymore.
Definition: MCDwarf.h:609
llvm::MCDwarfLineStr::getFinalizedData
SmallString< 0 > getFinalizedData()
Returns finalized section.
Definition: MCDwarf.cpp:341
llvm::MCDwarfFrameEmitter::EmitAdvanceLoc
static void EmitAdvanceLoc(MCObjectStreamer &Streamer, uint64_t AddrDelta)
Definition: MCDwarf.cpp:1916
llvm::MCDwarfFrameInfo::IsMTETaggedFrame
bool IsMTETaggedFrame
Definition: MCDwarf.h:697
llvm::SmallVectorImpl< std::string >
llvm::MCDwarfFrameInfo::IsSimple
bool IsSimple
Definition: MCDwarf.h:694
llvm::MCCFIInstruction::createOffset
static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, int Offset)
.cfi_offset Previous value of Register is saved at offset Offset from CFA.
Definition: MCDwarf.h:570
llvm::MCCFIInstruction::createRememberState
static MCCFIInstruction createRememberState(MCSymbol *L)
.cfi_remember_state Save all current rules for all registers.
Definition: MCDwarf.h:620
llvm::MCDwarfLineEntry
Instances of this class represent the line information for the dwarf line table entries.
Definition: MCDwarf.h:184
StringMap.h
llvm::MCDwarfLineTableHeader::resetMD5Usage
void resetMD5Usage()
Definition: MCDwarf.h:284
llvm::MCCFIInstruction::OpNegateRAState
@ OpNegateRAState
Definition: MCDwarf.h:496
llvm::MCDwarfFrameInfo
Definition: MCDwarf.h:681
llvm::MCDwarfLineAddr
Definition: MCDwarf.h:428
llvm::MCCFIInstruction::OpRestoreState
@ OpRestoreState
Definition: MCDwarf.h:483
llvm::MCCFIInstruction::createWindowSave
static MCCFIInstruction createWindowSave(MCSymbol *L)
.cfi_window_save SPARC register window is saved.
Definition: MCDwarf.h:591
llvm::ISD::MCSymbol
@ MCSymbol
Definition: ISDOpcodes.h:172
llvm::MCDwarfLineTable::hasRootFile
bool hasRootFile() const
Definition: MCDwarf.h:388
llvm::MCCFIInstruction::getLabel
MCSymbol * getLabel() const
Definition: MCDwarf.h:642
llvm::MCCFIInstruction::createRestore
static MCCFIInstruction createRestore(MCSymbol *L, unsigned Register)
.cfi_restore says that the rule for Register is now the same as it was at the beginning of the functi...
Definition: MCDwarf.h:603