LLVM  4.0.0
MCFragment.h
Go to the documentation of this file.
1 //===- MCFragment.h - Fragment type hierarchy -------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_MC_MCFRAGMENT_H
11 #define LLVM_MC_MCFRAGMENT_H
12 
13 #include "llvm/ADT/SmallString.h"
14 #include "llvm/ADT/ilist.h"
15 #include "llvm/ADT/ilist_node.h"
16 #include "llvm/ADT/iterator.h"
17 #include "llvm/MC/MCFixup.h"
18 #include "llvm/MC/MCInst.h"
19 
20 namespace llvm {
21 class MCSection;
22 class MCSymbol;
23 class MCSubtargetInfo;
24 
25 class MCFragment : public ilist_node_with_parent<MCFragment, MCSection> {
26  friend class MCAsmLayout;
27 
28  MCFragment() = delete;
29  MCFragment(const MCFragment &) = delete;
30  void operator=(const MCFragment &) = delete;
31 
32 public:
33  enum FragmentType : uint8_t {
47  };
48 
49 private:
51 
52 protected:
54 
55 private:
56  /// \brief Should this fragment be aligned to the end of a bundle?
57  bool AlignToBundleEnd;
58 
59  uint8_t BundlePadding;
60 
61  /// LayoutOrder - The layout order of this fragment.
62  unsigned LayoutOrder;
63 
64  /// The data for the section this fragment is in.
65  MCSection *Parent;
66 
67  /// Atom - The atom this fragment is in, as represented by it's defining
68  /// symbol.
69  const MCSymbol *Atom;
70 
71  /// \name Assembler Backend Data
72  /// @{
73  //
74  // FIXME: This could all be kept private to the assembler implementation.
75 
76  /// Offset - The offset of this fragment in its section. This is ~0 until
77  /// initialized.
78  uint64_t Offset;
79 
80  /// @}
81 
82 protected:
84  uint8_t BundlePadding, MCSection *Parent = nullptr);
85 
86  ~MCFragment();
87 
88 public:
89  /// Destroys the current fragment.
90  ///
91  /// This must be used instead of delete as MCFragment is non-virtual.
92  /// This method will dispatch to the appropriate subclass.
93  void destroy();
94 
95  FragmentType getKind() const { return Kind; }
96 
97  MCSection *getParent() const { return Parent; }
98  void setParent(MCSection *Value) { Parent = Value; }
99 
100  const MCSymbol *getAtom() const { return Atom; }
101  void setAtom(const MCSymbol *Value) { Atom = Value; }
102 
103  unsigned getLayoutOrder() const { return LayoutOrder; }
104  void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
105 
106  /// \brief Does this fragment have instructions emitted into it? By default
107  /// this is false, but specific fragment types may set it to true.
108  bool hasInstructions() const { return HasInstructions; }
109 
110  /// \brief Should this fragment be placed at the end of an aligned bundle?
111  bool alignToBundleEnd() const { return AlignToBundleEnd; }
112  void setAlignToBundleEnd(bool V) { AlignToBundleEnd = V; }
113 
114  /// \brief Get the padding size that must be inserted before this fragment.
115  /// Used for bundling. By default, no padding is inserted.
116  /// Note that padding size is restricted to 8 bits. This is an optimization
117  /// to reduce the amount of space used for each fragment. In practice, larger
118  /// padding should never be required.
119  uint8_t getBundlePadding() const { return BundlePadding; }
120 
121  /// \brief Set the padding size for this fragment. By default it's a no-op,
122  /// and only some fragments have a meaningful implementation.
123  void setBundlePadding(uint8_t N) { BundlePadding = N; }
124 
125  /// \brief Return true if given frgment has FT_Dummy type.
126  bool isDummy() const { return Kind == FT_Dummy; }
127 
128  void dump();
129 };
130 
131 class MCDummyFragment : public MCFragment {
132 public:
133  explicit MCDummyFragment(MCSection *Sec)
134  : MCFragment(FT_Dummy, false, 0, Sec){};
135  static bool classof(const MCFragment *F) { return F->getKind() == FT_Dummy; }
136 };
137 
138 /// Interface implemented by fragments that contain encoded instructions and/or
139 /// data.
140 ///
142 protected:
144  MCSection *Sec)
145  : MCFragment(FType, HasInstructions, 0, Sec) {}
146 
147 public:
148  static bool classof(const MCFragment *F) {
149  MCFragment::FragmentType Kind = F->getKind();
150  switch (Kind) {
151  default:
152  return false;
155  case MCFragment::FT_Data:
156  return true;
157  }
158  }
159 };
160 
161 /// Interface implemented by fragments that contain encoded instructions and/or
162 /// data.
163 ///
164 template<unsigned ContentsSize>
167 
168 protected:
170  bool HasInstructions,
171  MCSection *Sec)
172  : MCEncodedFragment(FType, HasInstructions, Sec) {}
173 
174 public:
175  SmallVectorImpl<char> &getContents() { return Contents; }
176  const SmallVectorImpl<char> &getContents() const { return Contents; }
177 };
178 
179 /// Interface implemented by fragments that contain encoded instructions and/or
180 /// data and also have fixups registered.
181 ///
182 template<unsigned ContentsSize, unsigned FixupsSize>
184  public MCEncodedFragmentWithContents<ContentsSize> {
185 
186  /// Fixups - The list of fixups in this fragment.
188 
189 protected:
191  bool HasInstructions,
192  MCSection *Sec)
193  : MCEncodedFragmentWithContents<ContentsSize>(FType, HasInstructions,
194  Sec) {}
195 
196 public:
199 
200  SmallVectorImpl<MCFixup> &getFixups() { return Fixups; }
201  const SmallVectorImpl<MCFixup> &getFixups() const { return Fixups; }
202 
203  fixup_iterator fixup_begin() { return Fixups.begin(); }
204  const_fixup_iterator fixup_begin() const { return Fixups.begin(); }
205 
206  fixup_iterator fixup_end() { return Fixups.end(); }
207  const_fixup_iterator fixup_end() const { return Fixups.end(); }
208 
209  static bool classof(const MCFragment *F) {
210  MCFragment::FragmentType Kind = F->getKind();
211  return Kind == MCFragment::FT_Relaxable || Kind == MCFragment::FT_Data ||
213  }
214 };
215 
216 /// Fragment for data and encoded instructions.
217 ///
219 public:
220  MCDataFragment(MCSection *Sec = nullptr)
221  : MCEncodedFragmentWithFixups<32, 4>(FT_Data, false, Sec) {}
222 
223  void setHasInstructions(bool V) { HasInstructions = V; }
224 
225  static bool classof(const MCFragment *F) {
226  return F->getKind() == MCFragment::FT_Data;
227  }
228 };
229 
230 /// This is a compact (memory-size-wise) fragment for holding an encoded
231 /// instruction (non-relaxable) that has no fixups registered. When applicable,
232 /// it can be used instead of MCDataFragment and lead to lower memory
233 /// consumption.
234 ///
236 public:
239  }
240 
241  static bool classof(const MCFragment *F) {
243  }
244 };
245 
246 /// A relaxable fragment holds on to its MCInst, since it may need to be
247 /// relaxed during the assembler layout and relaxation stage.
248 ///
250 
251  /// Inst - The instruction this is a fragment for.
252  MCInst Inst;
253 
254  /// STI - The MCSubtargetInfo in effect when the instruction was encoded.
255  const MCSubtargetInfo &STI;
256 
257 public:
258  MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI,
259  MCSection *Sec = nullptr)
261  Inst(Inst), STI(STI) {}
262 
263  const MCInst &getInst() const { return Inst; }
264  void setInst(const MCInst &Value) { Inst = Value; }
265 
266  const MCSubtargetInfo &getSubtargetInfo() { return STI; }
267 
268  static bool classof(const MCFragment *F) {
269  return F->getKind() == MCFragment::FT_Relaxable;
270  }
271 };
272 
273 class MCAlignFragment : public MCFragment {
274 
275  /// Alignment - The alignment to ensure, in bytes.
276  unsigned Alignment;
277 
278  /// EmitNops - Flag to indicate that (optimal) NOPs should be emitted instead
279  /// of using the provided value. The exact interpretation of this flag is
280  /// target dependent.
281  bool EmitNops : 1;
282 
283  /// Value - Value to use for filling padding bytes.
284  int64_t Value;
285 
286  /// ValueSize - The size of the integer (in bytes) of \p Value.
287  unsigned ValueSize;
288 
289  /// MaxBytesToEmit - The maximum number of bytes to emit; if the alignment
290  /// cannot be satisfied in this width then this fragment is ignored.
291  unsigned MaxBytesToEmit;
292 
293 public:
294  MCAlignFragment(unsigned Alignment, int64_t Value, unsigned ValueSize,
295  unsigned MaxBytesToEmit, MCSection *Sec = nullptr)
296  : MCFragment(FT_Align, false, 0, Sec), Alignment(Alignment),
297  EmitNops(false), Value(Value),
298  ValueSize(ValueSize), MaxBytesToEmit(MaxBytesToEmit) {}
299 
300  /// \name Accessors
301  /// @{
302 
303  unsigned getAlignment() const { return Alignment; }
304 
305  int64_t getValue() const { return Value; }
306 
307  unsigned getValueSize() const { return ValueSize; }
308 
309  unsigned getMaxBytesToEmit() const { return MaxBytesToEmit; }
310 
311  bool hasEmitNops() const { return EmitNops; }
312  void setEmitNops(bool Value) { EmitNops = Value; }
313 
314  /// @}
315 
316  static bool classof(const MCFragment *F) {
317  return F->getKind() == MCFragment::FT_Align;
318  }
319 };
320 
321 class MCFillFragment : public MCFragment {
322 
323  /// Value to use for filling bytes.
324  uint8_t Value;
325 
326  /// The number of bytes to insert.
327  uint64_t Size;
328 
329 public:
330  MCFillFragment(uint8_t Value, uint64_t Size, MCSection *Sec = nullptr)
331  : MCFragment(FT_Fill, false, 0, Sec), Value(Value), Size(Size) {}
332 
333  uint8_t getValue() const { return Value; }
334  uint64_t getSize() const { return Size; }
335 
336  static bool classof(const MCFragment *F) {
337  return F->getKind() == MCFragment::FT_Fill;
338  }
339 };
340 
341 class MCOrgFragment : public MCFragment {
342 
343  /// Offset - The offset this fragment should start at.
344  const MCExpr *Offset;
345 
346  /// Value - Value to use for filling bytes.
347  int8_t Value;
348 
349  /// Loc - Source location of the directive that this fragment was created for.
350  SMLoc Loc;
351 
352 public:
353  MCOrgFragment(const MCExpr &Offset, int8_t Value, SMLoc Loc,
354  MCSection *Sec = nullptr)
355  : MCFragment(FT_Org, false, 0, Sec), Offset(&Offset), Value(Value), Loc(Loc) {}
356 
357  /// \name Accessors
358  /// @{
359 
360  const MCExpr &getOffset() const { return *Offset; }
361 
362  uint8_t getValue() const { return Value; }
363 
364  SMLoc getLoc() const { return Loc; }
365 
366  /// @}
367 
368  static bool classof(const MCFragment *F) {
369  return F->getKind() == MCFragment::FT_Org;
370  }
371 };
372 
373 class MCLEBFragment : public MCFragment {
374 
375  /// Value - The value this fragment should contain.
376  const MCExpr *Value;
377 
378  /// IsSigned - True if this is a sleb128, false if uleb128.
379  bool IsSigned;
380 
381  SmallString<8> Contents;
382 
383 public:
384  MCLEBFragment(const MCExpr &Value_, bool IsSigned_, MCSection *Sec = nullptr)
385  : MCFragment(FT_LEB, false, 0, Sec), Value(&Value_), IsSigned(IsSigned_) {
386  Contents.push_back(0);
387  }
388 
389  /// \name Accessors
390  /// @{
391 
392  const MCExpr &getValue() const { return *Value; }
393 
394  bool isSigned() const { return IsSigned; }
395 
396  SmallString<8> &getContents() { return Contents; }
397  const SmallString<8> &getContents() const { return Contents; }
398 
399  /// @}
400 
401  static bool classof(const MCFragment *F) {
402  return F->getKind() == MCFragment::FT_LEB;
403  }
404 };
405 
407 
408  /// LineDelta - the value of the difference between the two line numbers
409  /// between two .loc dwarf directives.
410  int64_t LineDelta;
411 
412  /// AddrDelta - The expression for the difference of the two symbols that
413  /// make up the address delta between two .loc dwarf directives.
414  const MCExpr *AddrDelta;
415 
416  SmallString<8> Contents;
417 
418 public:
419  MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta,
420  MCSection *Sec = nullptr)
421  : MCFragment(FT_Dwarf, false, 0, Sec), LineDelta(LineDelta),
422  AddrDelta(&AddrDelta) {
423  Contents.push_back(0);
424  }
425 
426  /// \name Accessors
427  /// @{
428 
429  int64_t getLineDelta() const { return LineDelta; }
430 
431  const MCExpr &getAddrDelta() const { return *AddrDelta; }
432 
433  SmallString<8> &getContents() { return Contents; }
434  const SmallString<8> &getContents() const { return Contents; }
435 
436  /// @}
437 
438  static bool classof(const MCFragment *F) {
439  return F->getKind() == MCFragment::FT_Dwarf;
440  }
441 };
442 
444 
445  /// AddrDelta - The expression for the difference of the two symbols that
446  /// make up the address delta between two .cfi_* dwarf directives.
447  const MCExpr *AddrDelta;
448 
449  SmallString<8> Contents;
450 
451 public:
452  MCDwarfCallFrameFragment(const MCExpr &AddrDelta, MCSection *Sec = nullptr)
453  : MCFragment(FT_DwarfFrame, false, 0, Sec), AddrDelta(&AddrDelta) {
454  Contents.push_back(0);
455  }
456 
457  /// \name Accessors
458  /// @{
459 
460  const MCExpr &getAddrDelta() const { return *AddrDelta; }
461 
462  SmallString<8> &getContents() { return Contents; }
463  const SmallString<8> &getContents() const { return Contents; }
464 
465  /// @}
466 
467  static bool classof(const MCFragment *F) {
468  return F->getKind() == MCFragment::FT_DwarfFrame;
469  }
470 };
471 
473  const MCSymbol *Sym;
474 
475 public:
476  MCSafeSEHFragment(const MCSymbol *Sym, MCSection *Sec = nullptr)
477  : MCFragment(FT_SafeSEH, false, 0, Sec), Sym(Sym) {}
478 
479  /// \name Accessors
480  /// @{
481 
482  const MCSymbol *getSymbol() { return Sym; }
483  const MCSymbol *getSymbol() const { return Sym; }
484 
485  /// @}
486 
487  static bool classof(const MCFragment *F) {
488  return F->getKind() == MCFragment::FT_SafeSEH;
489  }
490 };
491 
492 /// Fragment representing the binary annotations produced by the
493 /// .cv_inline_linetable directive.
495  unsigned SiteFuncId;
496  unsigned StartFileId;
497  unsigned StartLineNum;
498  const MCSymbol *FnStartSym;
499  const MCSymbol *FnEndSym;
500  SmallString<8> Contents;
501 
502  /// CodeViewContext has the real knowledge about this format, so let it access
503  /// our members.
504  friend class CodeViewContext;
505 
506 public:
507  MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId,
508  unsigned StartLineNum, const MCSymbol *FnStartSym,
509  const MCSymbol *FnEndSym,
510  MCSection *Sec = nullptr)
511  : MCFragment(FT_CVInlineLines, false, 0, Sec), SiteFuncId(SiteFuncId),
512  StartFileId(StartFileId), StartLineNum(StartLineNum),
513  FnStartSym(FnStartSym), FnEndSym(FnEndSym) {}
514 
515  /// \name Accessors
516  /// @{
517 
518  const MCSymbol *getFnStartSym() const { return FnStartSym; }
519  const MCSymbol *getFnEndSym() const { return FnEndSym; }
520 
521  SmallString<8> &getContents() { return Contents; }
522  const SmallString<8> &getContents() const { return Contents; }
523 
524  /// @}
525 
526  static bool classof(const MCFragment *F) {
527  return F->getKind() == MCFragment::FT_CVInlineLines;
528  }
529 };
530 
531 /// Fragment representing the .cv_def_range directive.
534  SmallString<32> FixedSizePortion;
535 
536  /// CodeViewContext has the real knowledge about this format, so let it access
537  /// our members.
538  friend class CodeViewContext;
539 
540 public:
542  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
543  StringRef FixedSizePortion, MCSection *Sec = nullptr)
545  Ranges(Ranges.begin(), Ranges.end()),
546  FixedSizePortion(FixedSizePortion) {}
547 
548  /// \name Accessors
549  /// @{
551  return Ranges;
552  }
553 
554  StringRef getFixedSizePortion() const { return FixedSizePortion; }
555  /// @}
556 
557  static bool classof(const MCFragment *F) {
558  return F->getKind() == MCFragment::FT_CVDefRange;
559  }
560 };
561 
562 } // end namespace llvm
563 
564 #endif
uint8_t getBundlePadding() const
Get the padding size that must be inserted before this fragment.
Definition: MCFragment.h:119
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:40
void push_back(const T &Elt)
Definition: SmallVector.h:211
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:241
MCAlignFragment(unsigned Alignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit, MCSection *Sec=nullptr)
Definition: MCFragment.h:294
MCOrgFragment(const MCExpr &Offset, int8_t Value, SMLoc Loc, MCSection *Sec=nullptr)
Definition: MCFragment.h:353
static bool classof(const MCFragment *F)
Definition: MCFragment.h:401
unsigned getValueSize() const
Definition: MCFragment.h:307
const MCSymbol * getFnStartSym() const
Definition: MCFragment.h:518
MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta, MCSection *Sec=nullptr)
Definition: MCFragment.h:419
static bool classof(const MCFragment *F)
Definition: MCFragment.h:336
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:39
unsigned getAlignment() const
Definition: MCFragment.h:303
SmallString< 8 > & getContents()
Definition: MCFragment.h:521
static bool classof(const MCFragment *F)
Definition: MCFragment.h:135
const MCExpr & getAddrDelta() const
Definition: MCFragment.h:460
bool alignToBundleEnd() const
Should this fragment be placed at the end of an aligned bundle?
Definition: MCFragment.h:111
SMLoc getLoc() const
Definition: MCFragment.h:364
const MCSymbol * getFnEndSym() const
Definition: MCFragment.h:519
Interface implemented by fragments that contain encoded instructions and/or data. ...
Definition: MCFragment.h:165
MCCVDefRangeFragment(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * >> Ranges, StringRef FixedSizePortion, MCSection *Sec=nullptr)
Definition: MCFragment.h:541
static bool classof(const MCFragment *F)
Definition: MCFragment.h:487
const_iterator begin(StringRef path)
Get begin iterator over path.
Definition: Path.cpp:233
This is a compact (memory-size-wise) fragment for holding an encoded instruction (non-relaxable) that...
Definition: MCFragment.h:235
const MCSubtargetInfo & getSubtargetInfo()
Definition: MCFragment.h:266
bool isSigned() const
Definition: MCFragment.h:394
MCFillFragment(uint8_t Value, uint64_t Size, MCSection *Sec=nullptr)
Definition: MCFragment.h:330
uint8_t getValue() const
Definition: MCFragment.h:333
bool HasInstructions
Definition: MCFragment.h:53
uint64_t getSize() const
Definition: MCFragment.h:334
const MCExpr & getOffset() const
Definition: MCFragment.h:360
const MCInst & getInst() const
Definition: MCFragment.h:263
Interface implemented by fragments that contain encoded instructions and/or data. ...
Definition: MCFragment.h:141
const_fixup_iterator fixup_end() const
Definition: MCFragment.h:207
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:29
void setEmitNops(bool Value)
Definition: MCFragment.h:312
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:34
unsigned getMaxBytesToEmit() const
Definition: MCFragment.h:309
void setAlignToBundleEnd(bool V)
Definition: MCFragment.h:112
MCDummyFragment(MCSection *Sec)
Definition: MCFragment.h:133
int64_t getLineDelta() const
Definition: MCFragment.h:429
void destroy()
Destroys the current fragment.
Definition: MCFragment.cpp:248
#define F(x, y, z)
Definition: MD5.cpp:51
void setHasInstructions(bool V)
Definition: MCFragment.h:223
static bool classof(const MCFragment *F)
Definition: MCFragment.h:438
static bool classof(const MCFragment *F)
Definition: MCFragment.h:148
Function Alias Analysis false
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
const MCSymbol * getSymbol()
Definition: MCFragment.h:482
MCLEBFragment(const MCExpr &Value_, bool IsSigned_, MCSection *Sec=nullptr)
Definition: MCFragment.h:384
MCEncodedFragmentWithContents(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
Definition: MCFragment.h:169
SmallVectorImpl< char > & getContents()
Definition: MCFragment.h:175
const MCExpr & getAddrDelta() const
Definition: MCFragment.h:431
MCSafeSEHFragment(const MCSymbol *Sym, MCSection *Sec=nullptr)
Definition: MCFragment.h:476
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:150
MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI, MCSection *Sec=nullptr)
Definition: MCFragment.h:258
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
Definition: MCFragment.h:249
bool hasInstructions() const
Does this fragment have instructions emitted into it? By default this is false, but specific fragment...
Definition: MCFragment.h:108
An ilist node that can access its parent list.
Definition: ilist_node.h:243
static bool classof(const MCFragment *F)
Definition: MCFragment.h:368
bool hasEmitNops() const
Definition: MCFragment.h:311
const_fixup_iterator fixup_begin() const
Definition: MCFragment.h:204
static bool classof(const MCFragment *F)
Definition: MCFragment.h:268
bool isDummy() const
Return true if given frgment has FT_Dummy type.
Definition: MCFragment.h:126
FragmentType getKind() const
Definition: MCFragment.h:95
static bool classof(const MCFragment *F)
Definition: MCFragment.h:209
SmallVectorImpl< MCFixup > & getFixups()
Definition: MCFragment.h:200
MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
Definition: MCFragment.h:143
uint32_t Offset
MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId, unsigned StartLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym, MCSection *Sec=nullptr)
Definition: MCFragment.h:507
static bool classof(const MCFragment *F)
Definition: MCFragment.h:316
const SmallString< 8 > & getContents() const
Definition: MCFragment.h:397
Fragment representing the .cv_def_range directive.
Definition: MCFragment.h:532
const SmallVectorImpl< char > & getContents() const
Definition: MCFragment.h:176
MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, bool HasInstructions, MCSection *Sec)
Definition: MCFragment.h:190
StringRef getFixedSizePortion() const
Definition: MCFragment.h:554
MCCompactEncodedInstFragment(MCSection *Sec=nullptr)
Definition: MCFragment.h:237
MCSection * getParent() const
Definition: MCFragment.h:97
const SmallString< 8 > & getContents() const
Definition: MCFragment.h:434
ArrayRef< std::pair< const MCSymbol *, const MCSymbol * > > getRanges() const
Definition: MCFragment.h:550
SmallVectorImpl< MCFixup >::const_iterator const_fixup_iterator
Definition: MCFragment.h:197
SmallString< 8 > & getContents()
Definition: MCFragment.h:462
int64_t getValue() const
Definition: MCFragment.h:305
Fragment representing the binary annotations produced by the .cv_inline_linetable directive...
Definition: MCFragment.h:494
void setBundlePadding(uint8_t N)
Set the padding size for this fragment.
Definition: MCFragment.h:123
static bool classof(const MCFragment *F)
Definition: MCFragment.h:241
Basic Alias true
Interface implemented by fragments that contain encoded instructions and/or data and also have fixups...
Definition: MCFragment.h:183
const MCSymbol * getAtom() const
Definition: MCFragment.h:100
static bool classof(const MCFragment *F)
Definition: MCFragment.h:467
const SmallString< 8 > & getContents() const
Definition: MCFragment.h:463
#define N
static bool classof(const MCFragment *F)
Definition: MCFragment.h:557
MCSubtargetInfo - Generic base class for all target subtargets.
SmallString< 8 > & getContents()
Definition: MCFragment.h:396
void setLayoutOrder(unsigned Value)
Definition: MCFragment.h:104
const unsigned Kind
Fragment for data and encoded instructions.
Definition: MCFragment.h:218
const SmallVectorImpl< MCFixup > & getFixups() const
Definition: MCFragment.h:201
LLVM Value Representation.
Definition: Value.h:71
const MCExpr & getValue() const
Definition: MCFragment.h:392
unsigned getLayoutOrder() const
Definition: MCFragment.h:103
static bool classof(const MCFragment *F)
Definition: MCFragment.h:225
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
uint8_t getValue() const
Definition: MCFragment.h:362
SmallString< 8 > & getContents()
Definition: MCFragment.h:433
Represents a location in source code.
Definition: SMLoc.h:24
void setParent(MCSection *Value)
Definition: MCFragment.h:98
MCDataFragment(MCSection *Sec=nullptr)
Definition: MCFragment.h:220
MCDwarfCallFrameFragment(const MCExpr &AddrDelta, MCSection *Sec=nullptr)
Definition: MCFragment.h:452
const MCSymbol * getSymbol() const
Definition: MCFragment.h:483
SmallVectorImpl< MCFixup >::iterator fixup_iterator
Definition: MCFragment.h:198
void setInst(const MCInst &Value)
Definition: MCFragment.h:264
const SmallString< 8 > & getContents() const
Definition: MCFragment.h:522
void setAtom(const MCSymbol *Value)
Definition: MCFragment.h:101
Holds state from .cv_file and .cv_loc directives for later emission.
Definition: MCCodeView.h:158
static bool classof(const MCFragment *F)
Definition: MCFragment.h:526