LLVM  15.0.0git
MCStreamer.h
Go to the documentation of this file.
1 //===- MCStreamer.h - High-level Streaming Machine Code Output --*- 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 declares the MCStreamer class.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_MC_MCSTREAMER_H
14 #define LLVM_MC_MCSTREAMER_H
15 
16 #include "llvm/ADT/ArrayRef.h"
17 #include "llvm/ADT/DenseMap.h"
18 #include "llvm/ADT/Optional.h"
19 #include "llvm/ADT/SmallVector.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/MC/MCDirectives.h"
22 #include "llvm/MC/MCDwarf.h"
24 #include "llvm/MC/MCPseudoProbe.h"
25 #include "llvm/MC/MCWinEH.h"
27 #include "llvm/Support/Error.h"
28 #include "llvm/Support/MD5.h"
29 #include "llvm/Support/SMLoc.h"
31 #include <cassert>
32 #include <cstdint>
33 #include <memory>
34 #include <string>
35 #include <utility>
36 #include <vector>
37 
38 namespace llvm {
39 
40 class APInt;
41 class AssemblerConstantPools;
42 class MCAsmBackend;
43 class MCAssembler;
44 class MCContext;
45 class MCExpr;
46 class MCFragment;
47 class MCInst;
48 class MCInstPrinter;
49 class MCRegister;
50 class MCSection;
51 class MCStreamer;
52 class MCSubtargetInfo;
53 class MCSymbol;
54 class MCSymbolRefExpr;
55 class Triple;
56 class Twine;
57 class raw_ostream;
58 
59 namespace codeview {
60 struct DefRangeRegisterRelHeader;
61 struct DefRangeSubfieldRegisterHeader;
62 struct DefRangeRegisterHeader;
63 struct DefRangeFramePointerRelHeader;
64 }
65 
66 using MCSectionSubPair = std::pair<MCSection *, const MCExpr *>;
67 
68 /// Target specific streamer interface. This is used so that targets can
69 /// implement support for target specific assembly directives.
70 ///
71 /// If target foo wants to use this, it should implement 3 classes:
72 /// * FooTargetStreamer : public MCTargetStreamer
73 /// * FooTargetAsmStreamer : public FooTargetStreamer
74 /// * FooTargetELFStreamer : public FooTargetStreamer
75 ///
76 /// FooTargetStreamer should have a pure virtual method for each directive. For
77 /// example, for a ".bar symbol_name" directive, it should have
78 /// virtual emitBar(const MCSymbol &Symbol) = 0;
79 ///
80 /// The FooTargetAsmStreamer and FooTargetELFStreamer classes implement the
81 /// method. The assembly streamer just prints ".bar symbol_name". The object
82 /// streamer does whatever is needed to implement .bar in the object file.
83 ///
84 /// In the assembly printer and parser the target streamer can be used by
85 /// calling getTargetStreamer and casting it to FooTargetStreamer:
86 ///
87 /// MCTargetStreamer &TS = OutStreamer.getTargetStreamer();
88 /// FooTargetStreamer &ATS = static_cast<FooTargetStreamer &>(TS);
89 ///
90 /// The base classes FooTargetAsmStreamer and FooTargetELFStreamer should
91 /// *never* be treated differently. Callers should always talk to a
92 /// FooTargetStreamer.
94 protected:
96 
97 public:
99  virtual ~MCTargetStreamer();
100 
102 
103  // Allow a target to add behavior to the EmitLabel of MCStreamer.
104  virtual void emitLabel(MCSymbol *Symbol);
105  // Allow a target to add behavior to the emitAssignment of MCStreamer.
106  virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value);
107 
108  virtual void prettyPrintAsm(MCInstPrinter &InstPrinter, uint64_t Address,
109  const MCInst &Inst, const MCSubtargetInfo &STI,
110  raw_ostream &OS);
111 
113 
114  /// Update streamer for a new active section.
115  ///
116  /// This is called by popSection and switchSection, if the current
117  /// section changes.
118  virtual void changeSection(const MCSection *CurSection, MCSection *Section,
119  const MCExpr *SubSection, raw_ostream &OS);
120 
121  virtual void emitValue(const MCExpr *Value);
122 
123  /// Emit the bytes in \p Data into the output.
124  ///
125  /// This is used to emit bytes in \p Data as sequence of .byte directives.
126  virtual void emitRawBytes(StringRef Data);
127 
128  virtual void emitConstantPools();
129 
130  virtual void finish();
131 };
132 
133 // FIXME: declared here because it is used from
134 // lib/CodeGen/AsmPrinter/ARMException.cpp.
136 public:
138  ~ARMTargetStreamer() override;
139 
140  virtual void emitFnStart();
141  virtual void emitFnEnd();
142  virtual void emitCantUnwind();
143  virtual void emitPersonality(const MCSymbol *Personality);
144  virtual void emitPersonalityIndex(unsigned Index);
145  virtual void emitHandlerData();
146  virtual void emitSetFP(unsigned FpReg, unsigned SpReg,
147  int64_t Offset = 0);
148  virtual void emitMovSP(unsigned Reg, int64_t Offset = 0);
149  virtual void emitPad(int64_t Offset);
150  virtual void emitRegSave(const SmallVectorImpl<unsigned> &RegList,
151  bool isVector);
152  virtual void emitUnwindRaw(int64_t StackOffset,
153  const SmallVectorImpl<uint8_t> &Opcodes);
154 
155  virtual void switchVendor(StringRef Vendor);
156  virtual void emitAttribute(unsigned Attribute, unsigned Value);
157  virtual void emitTextAttribute(unsigned Attribute, StringRef String);
158  virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue,
159  StringRef StringValue = "");
160  virtual void emitFPU(unsigned FPU);
161  virtual void emitArch(ARM::ArchKind Arch);
162  virtual void emitArchExtension(uint64_t ArchExt);
163  virtual void emitObjectArch(ARM::ArchKind Arch);
164  void emitTargetAttributes(const MCSubtargetInfo &STI);
165  virtual void finishAttributeSection();
166  virtual void emitInst(uint32_t Inst, char Suffix = '\0');
167 
168  virtual void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE);
169 
170  virtual void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value);
171 
172  void emitConstantPools() override;
173 
174  virtual void emitARMWinCFIAllocStack(unsigned Size, bool Wide);
175  virtual void emitARMWinCFISaveRegMask(unsigned Mask, bool Wide);
176  virtual void emitARMWinCFISaveSP(unsigned Reg);
177  virtual void emitARMWinCFISaveFRegs(unsigned First, unsigned Last);
178  virtual void emitARMWinCFISaveLR(unsigned Offset);
179  virtual void emitARMWinCFIPrologEnd(bool Fragment);
180  virtual void emitARMWinCFINop(bool Wide);
181  virtual void emitARMWinCFIEpilogStart(unsigned Condition);
182  virtual void emitARMWinCFIEpilogEnd();
183  virtual void emitARMWinCFICustom(unsigned Opcode);
184 
185  /// Reset any state between object emissions, i.e. the equivalent of
186  /// MCStreamer's reset method.
187  virtual void reset();
188 
189  /// Callback used to implement the ldr= pseudo.
190  /// Add a new entry to the constant pool for the current section and return an
191  /// MCExpr that can be used to refer to the constant pool location.
192  const MCExpr *addConstantPoolEntry(const MCExpr *, SMLoc Loc);
193 
194  /// Callback used to implement the .ltorg directive.
195  /// Emit contents of constant pool for the current section.
197 
198 private:
199  std::unique_ptr<AssemblerConstantPools> ConstantPools;
200 };
201 
202 /// Streaming machine code generation interface.
203 ///
204 /// This interface is intended to provide a programmatic interface that is very
205 /// similar to the level that an assembler .s file provides. It has callbacks
206 /// to emit bytes, handle directives, etc. The implementation of this interface
207 /// retains state to know what the current section is etc.
208 ///
209 /// There are multiple implementations of this interface: one for writing out
210 /// a .s file, and implementations that write out .o files of various formats.
211 ///
212 class MCStreamer {
213  MCContext &Context;
214  std::unique_ptr<MCTargetStreamer> TargetStreamer;
215 
216  std::vector<MCDwarfFrameInfo> DwarfFrameInfos;
217  MCDwarfFrameInfo *getCurrentDwarfFrameInfo();
218 
219  /// Similar to DwarfFrameInfos, but for SEH unwind info. Chained frames may
220  /// refer to each other, so use std::unique_ptr to provide pointer stability.
221  std::vector<std::unique_ptr<WinEH::FrameInfo>> WinFrameInfos;
222 
223  WinEH::FrameInfo *CurrentWinFrameInfo;
224  size_t CurrentProcWinFrameInfoStartIndex;
225 
226  /// Tracks an index to represent the order a symbol was emitted in.
227  /// Zero means we did not emit that symbol.
229 
230  /// This is stack of current and previous section values saved by
231  /// pushSection.
233 
234  /// Pointer to the parser's SMLoc if available. This is used to provide
235  /// locations for diagnostics.
236  const SMLoc *StartTokLocPtr = nullptr;
237 
238  /// The next unique ID to use when creating a WinCFI-related section (.pdata
239  /// or .xdata). This ID ensures that we have a one-to-one mapping from
240  /// code section to unwind info section, which MSVC's incremental linker
241  /// requires.
242  unsigned NextWinCFIID = 0;
243 
244  bool UseAssemblerInfoForParsing;
245 
246  /// Is the assembler allowed to insert padding automatically? For
247  /// correctness reasons, we sometimes need to ensure instructions aren't
248  /// separated in unexpected ways. At the moment, this feature is only
249  /// useable from an integrated assembler, but assembly syntax is under
250  /// discussion for future inclusion.
251  bool AllowAutoPadding = false;
252 
253 protected:
254  MCStreamer(MCContext &Ctx);
255 
256  virtual void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
257  virtual void emitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame);
258 
260  return CurrentWinFrameInfo;
261  }
262 
263  virtual void emitWindowsUnwindTables(WinEH::FrameInfo *Frame);
264 
265  virtual void emitWindowsUnwindTables();
266 
267  virtual void emitRawTextImpl(StringRef String);
268 
269  /// Returns true if the the .cv_loc directive is in the right section.
270  bool checkCVLocSection(unsigned FuncId, unsigned FileNo, SMLoc Loc);
271 
272 public:
273  MCStreamer(const MCStreamer &) = delete;
274  MCStreamer &operator=(const MCStreamer &) = delete;
275  virtual ~MCStreamer();
276 
277  void visitUsedExpr(const MCExpr &Expr);
278  virtual void visitUsedSymbol(const MCSymbol &Sym);
279 
281  TargetStreamer.reset(TS);
282  }
283 
284  void setStartTokLocPtr(const SMLoc *Loc) { StartTokLocPtr = Loc; }
286  return StartTokLocPtr ? *StartTokLocPtr : SMLoc();
287  }
288 
289  /// State management
290  ///
291  virtual void reset();
292 
293  MCContext &getContext() const { return Context; }
294 
295  virtual MCAssembler *getAssemblerPtr() { return nullptr; }
296 
297  void setUseAssemblerInfoForParsing(bool v) { UseAssemblerInfoForParsing = v; }
298  bool getUseAssemblerInfoForParsing() { return UseAssemblerInfoForParsing; }
299 
301  return TargetStreamer.get();
302  }
303 
304  void setAllowAutoPadding(bool v) { AllowAutoPadding = v; }
305  bool getAllowAutoPadding() const { return AllowAutoPadding; }
306 
307  /// When emitting an object file, create and emit a real label. When emitting
308  /// textual assembly, this should do nothing to avoid polluting our output.
309  virtual MCSymbol *emitCFILabel();
310 
311  /// Retrieve the current frame info if one is available and it is not yet
312  /// closed. Otherwise, issue an error and return null.
314 
315  unsigned getNumFrameInfos();
317 
319 
320  unsigned getNumWinFrameInfos() { return WinFrameInfos.size(); }
322  return WinFrameInfos;
323  }
324 
326 
327  /// \name Assembly File Formatting.
328  /// @{
329 
330  /// Return true if this streamer supports verbose assembly and if it is
331  /// enabled.
332  virtual bool isVerboseAsm() const { return false; }
333 
334  /// Return true if this asm streamer supports emitting unformatted text
335  /// to the .s file with EmitRawText.
336  virtual bool hasRawTextSupport() const { return false; }
337 
338  /// Is the integrated assembler required for this streamer to function
339  /// correctly?
340  virtual bool isIntegratedAssemblerRequired() const { return false; }
341 
342  /// Add a textual comment.
343  ///
344  /// Typically for comments that can be emitted to the generated .s
345  /// file if applicable as a QoI issue to make the output of the compiler
346  /// more readable. This only affects the MCAsmStreamer, and only when
347  /// verbose assembly output is enabled.
348  ///
349  /// If the comment includes embedded \n's, they will each get the comment
350  /// prefix as appropriate. The added comment should not end with a \n.
351  /// By default, each comment is terminated with an end of line, i.e. the
352  /// EOL param is set to true by default. If one prefers not to end the
353  /// comment with a new line then the EOL param should be passed
354  /// with a false value.
355  virtual void AddComment(const Twine &T, bool EOL = true) {}
356 
357  /// Return a raw_ostream that comments can be written to. Unlike
358  /// AddComment, you are required to terminate comments with \n if you use this
359  /// method.
360  virtual raw_ostream &getCommentOS();
361 
362  /// Print T and prefix it with the comment string (normally #) and
363  /// optionally a tab. This prints the comment immediately, not at the end of
364  /// the current line. It is basically a safe version of EmitRawText: since it
365  /// only prints comments, the object streamer ignores it instead of asserting.
366  virtual void emitRawComment(const Twine &T, bool TabPrefix = true);
367 
368  /// Add explicit comment T. T is required to be a valid
369  /// comment in the output and does not need to be escaped.
370  virtual void addExplicitComment(const Twine &T);
371 
372  /// Emit added explicit comments.
373  virtual void emitExplicitComments();
374 
375  /// Emit a blank line to a .s file to pretty it up.
376  virtual void addBlankLine() {}
377 
378  /// @}
379 
380  /// \name Symbol & Section Management
381  /// @{
382 
383  /// Return the current section that the streamer is emitting code to.
385  if (!SectionStack.empty())
386  return SectionStack.back().first;
387  return MCSectionSubPair();
388  }
389  MCSection *getCurrentSectionOnly() const { return getCurrentSection().first; }
390 
391  /// Return the previous section that the streamer is emitting code to.
393  if (!SectionStack.empty())
394  return SectionStack.back().second;
395  return MCSectionSubPair();
396  }
397 
398  /// Returns an index to represent the order a symbol was emitted in.
399  /// (zero if we did not emit that symbol)
400  unsigned getSymbolOrder(const MCSymbol *Sym) const {
401  return SymbolOrdering.lookup(Sym);
402  }
403 
404  /// Update streamer for a new active section.
405  ///
406  /// This is called by popSection and switchSection, if the current
407  /// section changes.
408  virtual void changeSection(MCSection *, const MCExpr *);
409 
410  /// Save the current and previous section on the section stack.
411  void pushSection() {
412  SectionStack.push_back(
413  std::make_pair(getCurrentSection(), getPreviousSection()));
414  }
415 
416  /// Restore the current and previous section from the section stack.
417  /// Calls changeSection as needed.
418  ///
419  /// Returns false if the stack was empty.
420  bool popSection() {
421  if (SectionStack.size() <= 1)
422  return false;
423  auto I = SectionStack.end();
424  --I;
425  MCSectionSubPair OldSection = I->first;
426  --I;
427  MCSectionSubPair NewSection = I->first;
428 
429  if (NewSection.first && OldSection != NewSection)
430  changeSection(NewSection.first, NewSection.second);
431  SectionStack.pop_back();
432  return true;
433  }
434 
435  bool subSection(const MCExpr *Subsection) {
436  if (SectionStack.empty())
437  return false;
438 
439  switchSection(SectionStack.back().first.first, Subsection);
440  return true;
441  }
442 
443  /// Set the current section where code is being emitted to \p Section. This
444  /// is required to update CurSection.
445  ///
446  /// This corresponds to assembler directives like .section, .text, etc.
447  virtual void switchSection(MCSection *Section,
448  const MCExpr *Subsection = nullptr);
449 
450  /// Set the current section where code is being emitted to \p Section.
451  /// This is required to update CurSection. This version does not call
452  /// changeSection.
454  const MCExpr *Subsection = nullptr) {
455  assert(Section && "Cannot switch to a null section!");
456  MCSectionSubPair curSection = SectionStack.back().first;
457  SectionStack.back().second = curSection;
458  if (MCSectionSubPair(Section, Subsection) != curSection)
459  SectionStack.back().first = MCSectionSubPair(Section, Subsection);
460  }
461 
462  /// Create the default sections and set the initial one.
463  virtual void initSections(bool NoExecStack, const MCSubtargetInfo &STI);
464 
465  MCSymbol *endSection(MCSection *Section);
466 
467  /// Sets the symbol's section.
468  ///
469  /// Each emitted symbol will be tracked in the ordering table,
470  /// so we can sort on them later.
471  void assignFragment(MCSymbol *Symbol, MCFragment *Fragment);
472 
473  /// Returns the mnemonic for \p MI, if the streamer has access to a
474  /// instruction printer and returns an empty string otherwise.
475  virtual StringRef getMnemonic(MCInst &MI) { return ""; }
476 
477  /// Emit a label for \p Symbol into the current section.
478  ///
479  /// This corresponds to an assembler statement such as:
480  /// foo:
481  ///
482  /// \param Symbol - The symbol to emit. A given symbol should only be
483  /// emitted as a label once, and symbols emitted as a label should never be
484  /// used in an assignment.
485  // FIXME: These emission are non-const because we mutate the symbol to
486  // add the section we're emitting it to later.
487  virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc());
488 
489  virtual void emitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol);
490 
491  /// Note in the output the specified \p Flag.
492  virtual void emitAssemblerFlag(MCAssemblerFlag Flag);
493 
494  /// Emit the given list \p Options of strings as linker
495  /// options into the output.
497 
498  /// Note in the output the specified region \p Kind.
500 
501  /// Specify the Mach-O minimum deployment target version.
502  virtual void emitVersionMin(MCVersionMinType Type, unsigned Major,
503  unsigned Minor, unsigned Update,
504  VersionTuple SDKVersion) {}
505 
506  /// Emit/Specify Mach-O build version command.
507  /// \p Platform should be one of MachO::PlatformType.
508  virtual void emitBuildVersion(unsigned Platform, unsigned Major,
509  unsigned Minor, unsigned Update,
510  VersionTuple SDKVersion) {}
511 
512  virtual void emitDarwinTargetVariantBuildVersion(unsigned Platform,
513  unsigned Major,
514  unsigned Minor,
515  unsigned Update,
516  VersionTuple SDKVersion) {}
517 
518  void emitVersionForTarget(const Triple &Target,
519  const VersionTuple &SDKVersion,
520  const Triple *DarwinTargetVariantTriple,
521  const VersionTuple &DarwinTargetVariantSDKVersion);
522 
523  /// Note in the output that the specified \p Func is a Thumb mode
524  /// function (ARM target only).
525  virtual void emitThumbFunc(MCSymbol *Func);
526 
527  /// Emit an assignment of \p Value to \p Symbol.
528  ///
529  /// This corresponds to an assembler statement such as:
530  /// symbol = value
531  ///
532  /// The assignment generates no code, but has the side effect of binding the
533  /// value in the current context. For the assembly streamer, this prints the
534  /// binding into the .s file.
535  ///
536  /// \param Symbol - The symbol being assigned to.
537  /// \param Value - The value for the symbol.
538  virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value);
539 
540  /// Emit an assignment of \p Value to \p Symbol, but only if \p Value is also
541  /// emitted.
542  virtual void emitConditionalAssignment(MCSymbol *Symbol, const MCExpr *Value);
543 
544  /// Emit an weak reference from \p Alias to \p Symbol.
545  ///
546  /// This corresponds to an assembler statement such as:
547  /// .weakref alias, symbol
548  ///
549  /// \param Alias - The alias that is being created.
550  /// \param Symbol - The symbol being aliased.
551  virtual void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol);
552 
553  /// Add the given \p Attribute to \p Symbol.
554  virtual bool emitSymbolAttribute(MCSymbol *Symbol,
555  MCSymbolAttr Attribute) = 0;
556 
557  /// Set the \p DescValue for the \p Symbol.
558  ///
559  /// \param Symbol - The symbol to have its n_desc field set.
560  /// \param DescValue - The value to set into the n_desc field.
561  virtual void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
562 
563  /// Start emitting COFF symbol definition
564  ///
565  /// \param Symbol - The symbol to have its External & Type fields set.
566  virtual void beginCOFFSymbolDef(const MCSymbol *Symbol);
567 
568  /// Emit the storage class of the symbol.
569  ///
570  /// \param StorageClass - The storage class the symbol should have.
571  virtual void emitCOFFSymbolStorageClass(int StorageClass);
572 
573  /// Emit the type of the symbol.
574  ///
575  /// \param Type - A COFF type identifier (see COFF::SymbolType in X86COFF.h)
576  virtual void emitCOFFSymbolType(int Type);
577 
578  /// Marks the end of the symbol definition.
579  virtual void endCOFFSymbolDef();
580 
581  virtual void emitCOFFSafeSEH(MCSymbol const *Symbol);
582 
583  /// Emits the symbol table index of a Symbol into the current section.
584  virtual void emitCOFFSymbolIndex(MCSymbol const *Symbol);
585 
586  /// Emits a COFF section index.
587  ///
588  /// \param Symbol - Symbol the section number relocation should point to.
589  virtual void emitCOFFSectionIndex(MCSymbol const *Symbol);
590 
591  /// Emits a COFF section relative relocation.
592  ///
593  /// \param Symbol - Symbol the section relative relocation should point to.
594  virtual void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset);
595 
596  /// Emits a COFF image relative relocation.
597  ///
598  /// \param Symbol - Symbol the image relative relocation should point to.
599  virtual void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset);
600 
601  /// Emits an lcomm directive with XCOFF csect information.
602  ///
603  /// \param LabelSym - Label on the block of storage.
604  /// \param Size - The size of the block of storage.
605  /// \param CsectSym - Csect name for the block of storage.
606  /// \param ByteAlignment - The alignment of the symbol in bytes. Must be a
607  /// power of 2.
608  virtual void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
609  MCSymbol *CsectSym,
610  unsigned ByteAlignment);
611 
612  /// Emit a symbol's linkage and visibility with a linkage directive for XCOFF.
613  ///
614  /// \param Symbol - The symbol to emit.
615  /// \param Linkage - The linkage of the symbol to emit.
616  /// \param Visibility - The visibility of the symbol to emit or MCSA_Invalid
617  /// if the symbol does not have an explicit visibility.
619  MCSymbolAttr Linkage,
620  MCSymbolAttr Visibility);
621 
622  /// Emit a XCOFF .rename directive which creates a synonym for an illegal or
623  /// undesirable name.
624  ///
625  /// \param Name - The name used internally in the assembly for references to
626  /// the symbol.
627  /// \param Rename - The value to which the Name parameter is
628  /// changed at the end of assembly.
629  virtual void emitXCOFFRenameDirective(const MCSymbol *Name, StringRef Rename);
630 
631  /// Emit a XCOFF .ref directive which creates R_REF type entry in the
632  /// relocation table for one or more symbols.
633  ///
634  /// \param Sym - The symbol on the .ref directive.
635  virtual void emitXCOFFRefDirective(StringRef Sym);
636 
637  /// Emit an ELF .size directive.
638  ///
639  /// This corresponds to an assembler statement such as:
640  /// .size symbol, expression
641  virtual void emitELFSize(MCSymbol *Symbol, const MCExpr *Value);
642 
643  /// Emit an ELF .symver directive.
644  ///
645  /// This corresponds to an assembler statement such as:
646  /// .symver _start, foo@@SOME_VERSION
647  virtual void emitELFSymverDirective(const MCSymbol *OriginalSym,
648  StringRef Name, bool KeepOriginalSym);
649 
650  /// Emit a Linker Optimization Hint (LOH) directive.
651  /// \param Args - Arguments of the LOH.
652  virtual void emitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) {}
653 
654  /// Emit a .gnu_attribute directive.
655  virtual void emitGNUAttribute(unsigned Tag, unsigned Value) {}
656 
657  /// Emit a common symbol.
658  ///
659  /// \param Symbol - The common symbol to emit.
660  /// \param Size - The size of the common symbol.
661  /// \param ByteAlignment - The alignment of the symbol if
662  /// non-zero. This must be a power of 2.
663  virtual void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
664  unsigned ByteAlignment) = 0;
665 
666  /// Emit a local common (.lcomm) symbol.
667  ///
668  /// \param Symbol - The common symbol to emit.
669  /// \param Size - The size of the common symbol.
670  /// \param ByteAlignment - The alignment of the common symbol in bytes.
671  virtual void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
672  unsigned ByteAlignment);
673 
674  /// Emit the zerofill section and an optional symbol.
675  ///
676  /// \param Section - The zerofill section to create and or to put the symbol
677  /// \param Symbol - The zerofill symbol to emit, if non-NULL.
678  /// \param Size - The size of the zerofill symbol.
679  /// \param ByteAlignment - The alignment of the zerofill symbol if
680  /// non-zero. This must be a power of 2 on some targets.
681  virtual void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
682  uint64_t Size = 0, unsigned ByteAlignment = 0,
683  SMLoc Loc = SMLoc()) = 0;
684 
685  /// Emit a thread local bss (.tbss) symbol.
686  ///
687  /// \param Section - The thread local common section.
688  /// \param Symbol - The thread local common symbol to emit.
689  /// \param Size - The size of the symbol.
690  /// \param ByteAlignment - The alignment of the thread local common symbol
691  /// if non-zero. This must be a power of 2 on some targets.
692  virtual void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
693  uint64_t Size, unsigned ByteAlignment = 0);
694 
695  /// @}
696  /// \name Generating Data
697  /// @{
698 
699  /// Emit the bytes in \p Data into the output.
700  ///
701  /// This is used to implement assembler directives such as .byte, .ascii,
702  /// etc.
703  virtual void emitBytes(StringRef Data);
704 
705  /// Functionally identical to EmitBytes. When emitting textual assembly, this
706  /// method uses .byte directives instead of .ascii or .asciz for readability.
707  virtual void emitBinaryData(StringRef Data);
708 
709  /// Emit the expression \p Value into the output as a native
710  /// integer of the given \p Size bytes.
711  ///
712  /// This is used to implement assembler directives such as .word, .quad,
713  /// etc.
714  ///
715  /// \param Value - The value to emit.
716  /// \param Size - The size of the integer (in bytes) to emit. This must
717  /// match a native machine width.
718  /// \param Loc - The location of the expression for error reporting.
719  virtual void emitValueImpl(const MCExpr *Value, unsigned Size,
720  SMLoc Loc = SMLoc());
721 
722  void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc = SMLoc());
723 
724  /// Special case of EmitValue that avoids the client having
725  /// to pass in a MCExpr for constant integers.
726  virtual void emitIntValue(uint64_t Value, unsigned Size);
727  virtual void emitIntValue(APInt Value);
728 
729  /// Special case of EmitValue that avoids the client having to pass
730  /// in a MCExpr for constant integers & prints in Hex format for certain
731  /// modes.
732  virtual void emitIntValueInHex(uint64_t Value, unsigned Size) {
733  emitIntValue(Value, Size);
734  }
735 
740 
741  /// Special case of EmitValue that avoids the client having to pass
742  /// in a MCExpr for constant integers & prints in Hex format for certain
743  /// modes, pads the field with leading zeros to Size width
744  virtual void emitIntValueInHexWithPadding(uint64_t Value, unsigned Size) {
745  emitIntValue(Value, Size);
746  }
747 
748  virtual void emitULEB128Value(const MCExpr *Value);
749 
750  virtual void emitSLEB128Value(const MCExpr *Value);
751 
752  /// Special case of EmitULEB128Value that avoids the client having to
753  /// pass in a MCExpr for constant integers.
754  void emitULEB128IntValue(uint64_t Value, unsigned PadTo = 0);
755 
756  /// Special case of EmitSLEB128Value that avoids the client having to
757  /// pass in a MCExpr for constant integers.
758  void emitSLEB128IntValue(int64_t Value);
759 
760  /// Special case of EmitValue that avoids the client having to pass in
761  /// a MCExpr for MCSymbols.
762  void emitSymbolValue(const MCSymbol *Sym, unsigned Size,
763  bool IsSectionRelative = false);
764 
765  /// Emit the expression \p Value into the output as a dtprel
766  /// (64-bit DTP relative) value.
767  ///
768  /// This is used to implement assembler directives such as .dtpreldword on
769  /// targets that support them.
770  virtual void emitDTPRel64Value(const MCExpr *Value);
771 
772  /// Emit the expression \p Value into the output as a dtprel
773  /// (32-bit DTP relative) value.
774  ///
775  /// This is used to implement assembler directives such as .dtprelword on
776  /// targets that support them.
777  virtual void emitDTPRel32Value(const MCExpr *Value);
778 
779  /// Emit the expression \p Value into the output as a tprel
780  /// (64-bit TP relative) value.
781  ///
782  /// This is used to implement assembler directives such as .tpreldword on
783  /// targets that support them.
784  virtual void emitTPRel64Value(const MCExpr *Value);
785 
786  /// Emit the expression \p Value into the output as a tprel
787  /// (32-bit TP relative) value.
788  ///
789  /// This is used to implement assembler directives such as .tprelword on
790  /// targets that support them.
791  virtual void emitTPRel32Value(const MCExpr *Value);
792 
793  /// Emit the expression \p Value into the output as a gprel64 (64-bit
794  /// GP relative) value.
795  ///
796  /// This is used to implement assembler directives such as .gpdword on
797  /// targets that support them.
798  virtual void emitGPRel64Value(const MCExpr *Value);
799 
800  /// Emit the expression \p Value into the output as a gprel32 (32-bit
801  /// GP relative) value.
802  ///
803  /// This is used to implement assembler directives such as .gprel32 on
804  /// targets that support them.
805  virtual void emitGPRel32Value(const MCExpr *Value);
806 
807  /// Emit NumBytes bytes worth of the value specified by FillValue.
808  /// This implements directives such as '.space'.
809  void emitFill(uint64_t NumBytes, uint8_t FillValue);
810 
811  /// Emit \p Size bytes worth of the value specified by \p FillValue.
812  ///
813  /// This is used to implement assembler directives such as .space or .skip.
814  ///
815  /// \param NumBytes - The number of bytes to emit.
816  /// \param FillValue - The value to use when filling bytes.
817  /// \param Loc - The location of the expression for error reporting.
818  virtual void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
819  SMLoc Loc = SMLoc());
820 
821  /// Emit \p NumValues copies of \p Size bytes. Each \p Size bytes is
822  /// taken from the lowest order 4 bytes of \p Expr expression.
823  ///
824  /// This is used to implement assembler directives such as .fill.
825  ///
826  /// \param NumValues - The number of copies of \p Size bytes to emit.
827  /// \param Size - The size (in bytes) of each repeated value.
828  /// \param Expr - The expression from which \p Size bytes are used.
829  virtual void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr,
830  SMLoc Loc = SMLoc());
831 
832  virtual void emitNops(int64_t NumBytes, int64_t ControlledNopLength,
833  SMLoc Loc, const MCSubtargetInfo& STI);
834 
835  /// Emit NumBytes worth of zeros.
836  /// This function properly handles data in virtual sections.
837  void emitZeros(uint64_t NumBytes);
838 
839  /// Emit some number of copies of \p Value until the byte alignment \p
840  /// ByteAlignment is reached.
841  ///
842  /// If the number of bytes need to emit for the alignment is not a multiple
843  /// of \p ValueSize, then the contents of the emitted fill bytes is
844  /// undefined.
845  ///
846  /// This used to implement the .align assembler directive.
847  ///
848  /// \param ByteAlignment - The alignment to reach. This must be a power of
849  /// two on some targets.
850  /// \param Value - The value to use when filling bytes.
851  /// \param ValueSize - The size of the integer (in bytes) to emit for
852  /// \p Value. This must match a native machine width.
853  /// \param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
854  /// the alignment cannot be reached in this many bytes, no bytes are
855  /// emitted.
856  virtual void emitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
857  unsigned ValueSize = 1,
858  unsigned MaxBytesToEmit = 0);
859 
860  /// Emit nops until the byte alignment \p ByteAlignment is reached.
861  ///
862  /// This used to align code where the alignment bytes may be executed. This
863  /// can emit different bytes for different sizes to optimize execution.
864  ///
865  /// \param ByteAlignment - The alignment to reach. This must be a power of
866  /// two on some targets.
867  /// \param STI - The MCSubtargetInfo in operation when padding is emitted.
868  /// \param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
869  /// the alignment cannot be reached in this many bytes, no bytes are
870  /// emitted.
871  virtual void emitCodeAlignment(unsigned ByteAlignment,
872  const MCSubtargetInfo *STI,
873  unsigned MaxBytesToEmit = 0);
874 
875  /// Emit some number of copies of \p Value until the byte offset \p
876  /// Offset is reached.
877  ///
878  /// This is used to implement assembler directives such as .org.
879  ///
880  /// \param Offset - The offset to reach. This may be an expression, but the
881  /// expression must be associated with the current section.
882  /// \param Value - The value to use when filling bytes.
883  virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value,
884  SMLoc Loc);
885 
886  /// @}
887 
888  /// Switch to a new logical file. This is used to implement the '.file
889  /// "foo.c"' assembler directive.
890  virtual void emitFileDirective(StringRef Filename);
891 
892  /// Emit ".file assembler diretive with additioal info.
893  virtual void emitFileDirective(StringRef Filename, StringRef CompilerVerion,
894  StringRef TimeStamp, StringRef Description);
895 
896  /// Emit the "identifiers" directive. This implements the
897  /// '.ident "version foo"' assembler directive.
898  virtual void emitIdent(StringRef IdentString) {}
899 
900  /// Associate a filename with a specified logical file number. This
901  /// implements the DWARF2 '.file 4 "foo.c"' assembler directive.
902  unsigned emitDwarfFileDirective(unsigned FileNo, StringRef Directory,
903  StringRef Filename,
904  Optional<MD5::MD5Result> Checksum = None,
906  unsigned CUID = 0) {
907  return cantFail(
908  tryEmitDwarfFileDirective(FileNo, Directory, Filename, Checksum,
909  Source, CUID));
910  }
911 
912  /// Associate a filename with a specified logical file number.
913  /// Also associate a directory, optional checksum, and optional source
914  /// text with the logical file. This implements the DWARF2
915  /// '.file 4 "dir/foo.c"' assembler directive, and the DWARF5
916  /// '.file 4 "dir/foo.c" md5 "..." source "..."' assembler directive.
918  unsigned FileNo, StringRef Directory, StringRef Filename,
920  unsigned CUID = 0);
921 
922  /// Specify the "root" file of the compilation, using the ".file 0" extension.
923  virtual void emitDwarfFile0Directive(StringRef Directory, StringRef Filename,
924  Optional<MD5::MD5Result> Checksum,
926  unsigned CUID = 0);
927 
928  virtual void emitCFIBKeyFrame();
929  virtual void emitCFIMTETaggedFrame();
930 
931  /// This implements the DWARF2 '.loc fileno lineno ...' assembler
932  /// directive.
933  virtual void emitDwarfLocDirective(unsigned FileNo, unsigned Line,
934  unsigned Column, unsigned Flags,
935  unsigned Isa, unsigned Discriminator,
936  StringRef FileName);
937 
938  /// Associate a filename with a specified logical file number, and also
939  /// specify that file's checksum information. This implements the '.cv_file 4
940  /// "foo.c"' assembler directive. Returns true on success.
941  virtual bool emitCVFileDirective(unsigned FileNo, StringRef Filename,
942  ArrayRef<uint8_t> Checksum,
943  unsigned ChecksumKind);
944 
945  /// Introduces a function id for use with .cv_loc.
946  virtual bool emitCVFuncIdDirective(unsigned FunctionId);
947 
948  /// Introduces an inline call site id for use with .cv_loc. Includes
949  /// extra information for inline line table generation.
950  virtual bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc,
951  unsigned IAFile, unsigned IALine,
952  unsigned IACol, SMLoc Loc);
953 
954  /// This implements the CodeView '.cv_loc' assembler directive.
955  virtual void emitCVLocDirective(unsigned FunctionId, unsigned FileNo,
956  unsigned Line, unsigned Column,
957  bool PrologueEnd, bool IsStmt,
958  StringRef FileName, SMLoc Loc);
959 
960  /// This implements the CodeView '.cv_linetable' assembler directive.
961  virtual void emitCVLinetableDirective(unsigned FunctionId,
962  const MCSymbol *FnStart,
963  const MCSymbol *FnEnd);
964 
965  /// This implements the CodeView '.cv_inline_linetable' assembler
966  /// directive.
967  virtual void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId,
968  unsigned SourceFileId,
969  unsigned SourceLineNum,
970  const MCSymbol *FnStartSym,
971  const MCSymbol *FnEndSym);
972 
973  /// This implements the CodeView '.cv_def_range' assembler
974  /// directive.
975  virtual void emitCVDefRangeDirective(
976  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
977  StringRef FixedSizePortion);
978 
979  virtual void emitCVDefRangeDirective(
980  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
982 
983  virtual void emitCVDefRangeDirective(
984  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
986 
987  virtual void emitCVDefRangeDirective(
988  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
990 
991  virtual void emitCVDefRangeDirective(
992  ArrayRef<std::pair<const MCSymbol *, const MCSymbol *>> Ranges,
994 
995  /// This implements the CodeView '.cv_stringtable' assembler directive.
996  virtual void emitCVStringTableDirective() {}
997 
998  /// This implements the CodeView '.cv_filechecksums' assembler directive.
1000 
1001  /// This implements the CodeView '.cv_filechecksumoffset' assembler
1002  /// directive.
1003  virtual void emitCVFileChecksumOffsetDirective(unsigned FileNo) {}
1004 
1005  /// This implements the CodeView '.cv_fpo_data' assembler directive.
1006  virtual void emitCVFPOData(const MCSymbol *ProcSym, SMLoc Loc = {}) {}
1007 
1008  /// Emit the absolute difference between two symbols.
1009  ///
1010  /// \pre Offset of \c Hi is greater than the offset \c Lo.
1011  virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo,
1012  unsigned Size);
1013 
1014  /// Emit the absolute difference between two symbols encoded with ULEB128.
1015  virtual void emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi,
1016  const MCSymbol *Lo);
1017 
1018  virtual MCSymbol *getDwarfLineTableSymbol(unsigned CUID);
1019  virtual void emitCFISections(bool EH, bool Debug);
1020  void emitCFIStartProc(bool IsSimple, SMLoc Loc = SMLoc());
1021  void emitCFIEndProc();
1022  virtual void emitCFIDefCfa(int64_t Register, int64_t Offset);
1023  virtual void emitCFIDefCfaOffset(int64_t Offset);
1024  virtual void emitCFIDefCfaRegister(int64_t Register);
1025  virtual void emitCFILLVMDefAspaceCfa(int64_t Register, int64_t Offset,
1026  int64_t AddressSpace);
1027  virtual void emitCFIOffset(int64_t Register, int64_t Offset);
1028  virtual void emitCFIPersonality(const MCSymbol *Sym, unsigned Encoding);
1029  virtual void emitCFILsda(const MCSymbol *Sym, unsigned Encoding);
1030  virtual void emitCFIRememberState();
1031  virtual void emitCFIRestoreState();
1032  virtual void emitCFISameValue(int64_t Register);
1033  virtual void emitCFIRestore(int64_t Register);
1034  virtual void emitCFIRelOffset(int64_t Register, int64_t Offset);
1035  virtual void emitCFIAdjustCfaOffset(int64_t Adjustment);
1036  virtual void emitCFIEscape(StringRef Values);
1037  virtual void emitCFIReturnColumn(int64_t Register);
1038  virtual void emitCFIGnuArgsSize(int64_t Size);
1039  virtual void emitCFISignalFrame();
1040  virtual void emitCFIUndefined(int64_t Register);
1041  virtual void emitCFIRegister(int64_t Register1, int64_t Register2);
1042  virtual void emitCFIWindowSave();
1043  virtual void emitCFINegateRAState();
1044 
1045  virtual void emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc = SMLoc());
1046  virtual void emitWinCFIEndProc(SMLoc Loc = SMLoc());
1047  /// This is used on platforms, such as Windows on ARM64, that require function
1048  /// or funclet sizes to be emitted in .xdata before the End marker is emitted
1049  /// for the frame. We cannot use the End marker, as it is not set at the
1050  /// point of emitting .xdata, in order to indicate that the frame is active.
1051  virtual void emitWinCFIFuncletOrFuncEnd(SMLoc Loc = SMLoc());
1052  virtual void emitWinCFIStartChained(SMLoc Loc = SMLoc());
1053  virtual void emitWinCFIEndChained(SMLoc Loc = SMLoc());
1054  virtual void emitWinCFIPushReg(MCRegister Register, SMLoc Loc = SMLoc());
1055  virtual void emitWinCFISetFrame(MCRegister Register, unsigned Offset,
1056  SMLoc Loc = SMLoc());
1057  virtual void emitWinCFIAllocStack(unsigned Size, SMLoc Loc = SMLoc());
1058  virtual void emitWinCFISaveReg(MCRegister Register, unsigned Offset,
1059  SMLoc Loc = SMLoc());
1060  virtual void emitWinCFISaveXMM(MCRegister Register, unsigned Offset,
1061  SMLoc Loc = SMLoc());
1062  virtual void emitWinCFIPushFrame(bool Code, SMLoc Loc = SMLoc());
1063  virtual void emitWinCFIEndProlog(SMLoc Loc = SMLoc());
1064  virtual void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except,
1065  SMLoc Loc = SMLoc());
1066  virtual void emitWinEHHandlerData(SMLoc Loc = SMLoc());
1067 
1068  virtual void emitCGProfileEntry(const MCSymbolRefExpr *From,
1069  const MCSymbolRefExpr *To, uint64_t Count);
1070 
1071  /// Get the .pdata section used for the given section. Typically the given
1072  /// section is either the main .text section or some other COMDAT .text
1073  /// section, but it may be any section containing code.
1074  MCSection *getAssociatedPDataSection(const MCSection *TextSec);
1075 
1076  /// Get the .xdata section used for the given section.
1077  MCSection *getAssociatedXDataSection(const MCSection *TextSec);
1078 
1079  virtual void emitSyntaxDirective();
1080 
1081  /// Record a relocation described by the .reloc directive. Return None if
1082  /// succeeded. Otherwise, return a pair (Name is invalid, error message).
1083  virtual Optional<std::pair<bool, std::string>>
1084  emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr,
1085  SMLoc Loc, const MCSubtargetInfo &STI) {
1086  return None;
1087  }
1088 
1089  virtual void emitAddrsig() {}
1090  virtual void emitAddrsigSym(const MCSymbol *Sym) {}
1091 
1092  /// Emit the given \p Instruction into the current section.
1093  virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI);
1094 
1095  /// Emit the a pseudo probe into the current section.
1096  virtual void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type,
1097  uint64_t Attr,
1098  const MCPseudoProbeInlineStack &InlineStack);
1099 
1100  /// Set the bundle alignment mode from now on in the section.
1101  /// The argument is the power of 2 to which the alignment is set. The
1102  /// value 0 means turn the bundle alignment off.
1103  virtual void emitBundleAlignMode(unsigned AlignPow2);
1104 
1105  /// The following instructions are a bundle-locked group.
1106  ///
1107  /// \param AlignToEnd - If true, the bundle-locked group will be aligned to
1108  /// the end of a bundle.
1109  virtual void emitBundleLock(bool AlignToEnd);
1110 
1111  /// Ends a bundle-locked group.
1112  virtual void emitBundleUnlock();
1113 
1114  /// If this file is backed by a assembly streamer, this dumps the
1115  /// specified string in the output .s file. This capability is indicated by
1116  /// the hasRawTextSupport() predicate. By default this aborts.
1117  void emitRawText(const Twine &String);
1118 
1119  /// Streamer specific finalization.
1120  virtual void finishImpl();
1121  /// Finish emission of machine code.
1122  void finish(SMLoc EndLoc = SMLoc());
1123 
1124  virtual bool mayHaveInstructions(MCSection &Sec) const { return true; }
1125 
1126  /// Emit a special value of 0xffffffff if producing 64-bit debugging info.
1127  void maybeEmitDwarf64Mark();
1128 
1129  /// Emit a unit length field. The actual format, DWARF32 or DWARF64, is chosen
1130  /// according to the settings.
1131  virtual void emitDwarfUnitLength(uint64_t Length, const Twine &Comment);
1132 
1133  /// Emit a unit length field. The actual format, DWARF32 or DWARF64, is chosen
1134  /// according to the settings.
1135  /// Return the end symbol generated inside, the caller needs to emit it.
1136  virtual MCSymbol *emitDwarfUnitLength(const Twine &Prefix,
1137  const Twine &Comment);
1138 
1139  /// Emit the debug line start label.
1140  virtual void emitDwarfLineStartLabel(MCSymbol *StartSym);
1141 
1142  /// Emit the debug line end entry.
1143  virtual void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel) {}
1144 
1145  /// If targets does not support representing debug line section by .loc/.file
1146  /// directives in assembly output, we need to populate debug line section with
1147  /// raw debug line contents.
1148  virtual void emitDwarfAdvanceLineAddr(int64_t LineDelta,
1149  const MCSymbol *LastLabel,
1150  const MCSymbol *Label,
1151  unsigned PointerSize) {}
1152 
1153  /// Do finalization for the streamer at the end of a section.
1154  virtual void doFinalizationAtSectionEnd(MCSection *Section) {}
1155 };
1156 
1157 /// Create a dummy machine code streamer, which does nothing. This is useful for
1158 /// timing the assembler front end.
1159 MCStreamer *createNullStreamer(MCContext &Ctx);
1160 
1161 } // end namespace llvm
1162 
1163 #endif // LLVM_MC_MCSTREAMER_H
llvm::MCStreamer::setUseAssemblerInfoForParsing
void setUseAssemblerInfoForParsing(bool v)
Definition: MCStreamer.h:297
llvm::MCStreamer::emitCVInlineLinetableDirective
virtual void emitCVInlineLinetableDirective(unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, const MCSymbol *FnStartSym, const MCSymbol *FnEndSym)
This implements the CodeView '.cv_inline_linetable' assembler directive.
Definition: MCStreamer.cpp:350
llvm::MCTargetStreamer::getStreamer
MCStreamer & getStreamer()
Definition: MCStreamer.h:101
llvm::ARMTargetStreamer::emitCantUnwind
virtual void emitCantUnwind()
Definition: ARMTargetStreamer.cpp:92
llvm::MCStreamer::emitCVFileChecksumsDirective
virtual void emitCVFileChecksumsDirective()
This implements the CodeView '.cv_filechecksums' assembler directive.
Definition: MCStreamer.h:999
llvm::MCStreamer::emitCVFuncIdDirective
virtual bool emitCVFuncIdDirective(unsigned FunctionId)
Introduces a function id for use with .cv_loc.
Definition: MCStreamer.cpp:301
llvm::MCStreamer::emitCFIDefCfaOffset
virtual void emitCFIDefCfaOffset(int64_t Offset)
Definition: MCStreamer.cpp:503
llvm::MCVersionMinType
MCVersionMinType
Definition: MCDirectives.h:67
llvm::MCStreamer::emitDataRegion
virtual void emitDataRegion(MCDataRegionType Kind)
Note in the output the specified region Kind.
Definition: MCStreamer.h:499
llvm::MCStreamer::getAssociatedXDataSection
MCSection * getAssociatedXDataSection(const MCSection *TextSec)
Get the .xdata section used for the given section.
Definition: MCStreamer.cpp:852
llvm::MCStreamer::visitUsedExpr
void visitUsedExpr(const MCExpr &Expr)
Definition: MCStreamer.cpp:1070
llvm::MCTargetStreamer::changeSection
virtual void changeSection(const MCSection *CurSection, MCSection *Section, const MCExpr *SubSection, raw_ostream &OS)
Update streamer for a new active section.
Definition: MCStreamer.cpp:59
MCDwarf.h
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:104
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCDataRegionType
MCDataRegionType
Definition: MCDirectives.h:59
llvm::MCTargetStreamer::emitLabel
virtual void emitLabel(MCSymbol *Symbol)
Definition: MCStreamer.cpp:53
llvm::MCStreamer::emitCFILLVMDefAspaceCfa
virtual void emitCFILLVMDefAspaceCfa(int64_t Register, int64_t Offset, int64_t AddressSpace)
Definition: MCStreamer.cpp:534
llvm::MCStreamer::emitWinCFISetFrame
virtual void emitWinCFISetFrame(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:876
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCStreamer::setTargetStreamer
void setTargetStreamer(MCTargetStreamer *TS)
Definition: MCStreamer.h:280
llvm::ARMTargetStreamer::emitFnEnd
virtual void emitFnEnd()
Definition: ARMTargetStreamer.cpp:91
Optional.h
llvm::MCStreamer::emitCFIOffset
virtual void emitCFIOffset(int64_t Register, int64_t Offset)
Definition: MCStreamer.cpp:546
llvm::MCStreamer::emitAbsoluteSymbolDiffAsULEB128
virtual void emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi, const MCSymbol *Lo)
Emit the absolute difference between two symbols encoded with ULEB128.
Definition: MCStreamer.cpp:1141
llvm::cl::Prefix
@ Prefix
Definition: CommandLine.h:160
llvm::MCStreamer::getUseAssemblerInfoForParsing
bool getUseAssemblerInfoForParsing()
Definition: MCStreamer.h:298
llvm::MCTargetStreamer::emitRawBytes
virtual void emitRawBytes(StringRef Data)
Emit the bytes in Data into the output.
Definition: MCStreamer.cpp:80
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
llvm::Attribute
Definition: Attributes.h:65
llvm::MCLOHType
MCLOHType
Linker Optimization Hint Type.
Definition: MCLinkerOptimizationHint.h:33
llvm::DenseMapBase::lookup
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
Definition: DenseMap.h:199
llvm::ARMTargetStreamer
Definition: MCStreamer.h:135
llvm::MCStreamer::emitTPRel32Value
virtual void emitTPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a tprel (32-bit TP relative) value.
Definition: MCStreamer.cpp:205
llvm::MCStreamer::emitELFSize
virtual void emitELFSize(MCSymbol *Symbol, const MCExpr *Value)
Emit an ELF .size directive.
Definition: MCStreamer.cpp:1193
StringRef.h
llvm::ARMTargetStreamer::emitPersonality
virtual void emitPersonality(const MCSymbol *Personality)
Definition: ARMTargetStreamer.cpp:93
llvm::MCStreamer::emitCFISections
virtual void emitCFISections(bool EH, bool Debug)
Definition: MCStreamer.cpp:445
llvm::MCStreamer::emitInt64
void emitInt64(uint64_t Value)
Definition: MCStreamer.h:739
MCDirectives.h
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:145
llvm::MCStreamer::hasRawTextSupport
virtual bool hasRawTextSupport() const
Return true if this asm streamer supports emitting unformatted text to the .s file with EmitRawText.
Definition: MCStreamer.h:336
llvm::MCStreamer::emitWinCFIAllocStack
virtual void emitWinCFIAllocStack(unsigned Size, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:898
llvm::codeview::DefRangeFramePointerRelHeader
Definition: SymbolRecord.h:525
llvm::MCStreamer::emitInt8
void emitInt8(uint64_t Value)
Definition: MCStreamer.h:736
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1185
llvm::MCStreamer::emitCOFFSymbolStorageClass
virtual void emitCOFFSymbolStorageClass(int StorageClass)
Emit the storage class of the symbol.
Definition: MCStreamer.cpp:1164
llvm::MCStreamer::emitCFIStartProc
void emitCFIStartProc(bool IsSimple, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:447
VersionTuple.h
llvm::X86Disassembler::Reg
Reg
All possible values of the reg field in the ModR/M byte.
Definition: X86DisassemblerDecoder.h:462
llvm::MCStreamer::emitVersionMin
virtual void emitVersionMin(MCVersionMinType Type, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
Specify the Mach-O minimum deployment target version.
Definition: MCStreamer.h:502
llvm::MCStreamer::emitAddrsigSym
virtual void emitAddrsigSym(const MCSymbol *Sym)
Definition: MCStreamer.h:1090
llvm::MCTargetStreamer::finish
virtual void finish()
Definition: MCStreamer.cpp:55
llvm::MCStreamer::emitCFIRegister
virtual void emitCFIRegister(int64_t Register1, int64_t Register2)
Definition: MCStreamer.cpp:658
Error.h
llvm::MCStreamer::emitWinCFISaveReg
virtual void emitWinCFISaveReg(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:915
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
llvm::MCStreamer::emitCOFFSymbolType
virtual void emitCOFFSymbolType(int Type)
Emit the type of the symbol.
Definition: MCStreamer.cpp:1167
llvm::MCStreamer::emitXCOFFSymbolLinkageWithVisibility
virtual void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage, MCSymbolAttr Visibility)
Emit a symbol's linkage and visibility with a linkage directive for XCOFF.
Definition: MCStreamer.cpp:1176
llvm::ARMTargetStreamer::emitARMWinCFINop
virtual void emitARMWinCFINop(bool Wide)
Definition: ARMTargetStreamer.cpp:126
llvm::MCStreamer::emitCVLinetableDirective
virtual void emitCVLinetableDirective(unsigned FunctionId, const MCSymbol *FnStart, const MCSymbol *FnEnd)
This implements the CodeView '.cv_linetable' assembler directive.
Definition: MCStreamer.cpp:346
llvm::MCStreamer::emitValue
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:178
llvm::MCStreamer::emitValueImpl
virtual void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Emit the expression Value into the output as a native integer of the given Size bytes.
Definition: MCStreamer.cpp:1204
llvm::MCStreamer::emitWinEHHandler
virtual void emitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:783
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::MCStreamer::emitCFISignalFrame
virtual void emitCFISignalFrame()
Definition: MCStreamer.cpp:641
DenseMap.h
llvm::MCStreamer::emitXCOFFRenameDirective
virtual void emitXCOFFRenameDirective(const MCSymbol *Name, StringRef Rename)
Emit a XCOFF .rename directive which creates a synonym for an illegal or undesirable name.
Definition: MCStreamer.cpp:1183
llvm::MCStreamer::emitCFILabel
virtual MCSymbol * emitCFILabel()
When emitting an object file, create and emit a real label.
Definition: MCStreamer.cpp:486
llvm::ARMTargetStreamer::emitARMWinCFIAllocStack
virtual void emitARMWinCFIAllocStack(unsigned Size, bool Wide)
Definition: ARMTargetStreamer.cpp:121
llvm::MCStreamer::popSection
bool popSection()
Restore the current and previous section from the section stack.
Definition: MCStreamer.h:420
llvm::MCStreamer::emitPseudoProbe
virtual void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, const MCPseudoProbeInlineStack &InlineStack)
Emit the a pseudo probe into the current section.
Definition: MCStreamer.cpp:1103
llvm::MCStreamer::emitInt32
void emitInt32(uint64_t Value)
Definition: MCStreamer.h:738
MCPseudoProbe.h
llvm::MCStreamer::setAllowAutoPadding
void setAllowAutoPadding(bool v)
Definition: MCStreamer.h:304
llvm::ARMTargetStreamer::ARMTargetStreamer
ARMTargetStreamer(MCStreamer &S)
Definition: ARMTargetStreamer.cpp:29
llvm::Optional
Definition: APInt.h:33
llvm::MCTargetStreamer::MCTargetStreamer
MCTargetStreamer(MCStreamer &S)
Definition: MCStreamer.cpp:46
llvm::MCStreamer::emitCVLocDirective
virtual void emitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc)
This implements the CodeView '.cv_loc' assembler directive.
Definition: MCStreamer.cpp:319
llvm::MCStreamer::emitDTPRel32Value
virtual void emitDTPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a dtprel (32-bit DTP relative) value.
Definition: MCStreamer.cpp:197
llvm::MCStreamer::emitLinkerOptions
virtual void emitLinkerOptions(ArrayRef< std::string > Kind)
Emit the given list Options of strings as linker options into the output.
Definition: MCStreamer.h:496
llvm::MCStreamer::getCurrentSection
MCSectionSubPair getCurrentSection() const
Return the current section that the streamer is emitting code to.
Definition: MCStreamer.h:384
llvm::MCStreamer::emitWindowsUnwindTables
virtual void emitWindowsUnwindTables()
Definition: MCStreamer.cpp:998
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::MCAssemblerFlag
MCAssemblerFlag
Definition: MCDirectives.h:51
llvm::ARMTargetStreamer::reset
virtual void reset()
Reset any state between object emissions, i.e.
Definition: ARMTargetStreamer.cpp:51
llvm::dwarf::Tag
Tag
Definition: Dwarf.h:105
llvm::MCStreamer::getAllowAutoPadding
bool getAllowAutoPadding() const
Definition: MCStreamer.h:305
llvm::MCStreamer::emitAddrsig
virtual void emitAddrsig()
Definition: MCStreamer.h:1089
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::MCStreamer::emitDarwinTargetVariantBuildVersion
virtual void emitDarwinTargetVariantBuildVersion(unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
Definition: MCStreamer.h:512
llvm::ARMTargetStreamer::emitPad
virtual void emitPad(int64_t Offset)
Definition: ARMTargetStreamer.cpp:99
llvm::MCStreamer::emitDwarfUnitLength
virtual void emitDwarfUnitLength(uint64_t Length, const Twine &Comment)
Emit a unit length field.
Definition: MCStreamer.cpp:1023
llvm::MCStreamer::getCommentOS
virtual raw_ostream & getCommentOS()
Return a raw_ostream that comments can be written to.
Definition: MCStreamer.cpp:111
llvm::MCStreamer::emitCFIDefCfaRegister
virtual void emitCFIDefCfaRegister(int64_t Register)
Definition: MCStreamer.cpp:523
llvm::MCStreamer::emitCFIAdjustCfaOffset
virtual void emitCFIAdjustCfaOffset(int64_t Adjustment)
Definition: MCStreamer.cpp:513
llvm::MCSymbolAttr
MCSymbolAttr
Definition: MCDirectives.h:18
llvm::MCStreamer::MCStreamer
MCStreamer(MCContext &Ctx)
Definition: MCStreamer.cpp:94
llvm::MCStreamer::emitCFIPersonality
virtual void emitCFIPersonality(const MCSymbol *Sym, unsigned Encoding)
Definition: MCStreamer.cpp:566
llvm::MCStreamer::changeSection
virtual void changeSection(MCSection *, const MCExpr *)
Update streamer for a new active section.
Definition: MCStreamer.cpp:1200
llvm::MCStreamer::EnsureValidWinFrameInfo
WinEH::FrameInfo * EnsureValidWinFrameInfo(SMLoc Loc)
Retrieve the current frame info if one is available and it is not yet closed.
Definition: MCStreamer.cpp:694
llvm::MCStreamer::emitDTPRel64Value
virtual void emitDTPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a dtprel (64-bit DTP relative) value.
Definition: MCStreamer.cpp:193
llvm::MCStreamer::emitBundleLock
virtual void emitBundleLock(bool AlignToEnd)
The following instructions are a bundle-locked group.
Definition: MCStreamer.cpp:1221
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::MCStreamer::emitCFIEndProcImpl
virtual void emitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame)
Definition: MCStreamer.cpp:480
llvm::BitmaskEnumDetail::Mask
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
Definition: BitmaskEnum.h:80
llvm::MCFragment
Definition: MCFragment.h:30
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:212
llvm::MCStreamer::emitULEB128Value
virtual void emitULEB128Value(const MCExpr *Value)
Definition: MCStreamer.cpp:1207
llvm::MCStreamer::emitGPRel64Value
virtual void emitGPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a gprel64 (64-bit GP relative) value.
Definition: MCStreamer.cpp:209
llvm::ARMTargetStreamer::emitRegSave
virtual void emitRegSave(const SmallVectorImpl< unsigned > &RegList, bool isVector)
Definition: ARMTargetStreamer.cpp:100
llvm::MCStreamer::emitCFIUndefined
virtual void emitCFIUndefined(int64_t Register)
Definition: MCStreamer.cpp:648
llvm::MCStreamer::getPreviousSection
MCSectionSubPair getPreviousSection() const
Return the previous section that the streamer is emitting code to.
Definition: MCStreamer.h:392
llvm::MCAsmBackend
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:42
llvm::SMLoc
Represents a location in source code.
Definition: SMLoc.h:23
llvm::MCStreamer::emitCFIRelOffset
virtual void emitCFIRelOffset(int64_t Register, int64_t Offset)
Definition: MCStreamer.cpp:556
llvm::ARMTargetStreamer::emitInst
virtual void emitInst(uint32_t Inst, char Suffix='\0')
Definition: ARMTargetStreamer.cpp:53
llvm::MCStreamer::emitCFISameValue
virtual void emitCFISameValue(int64_t Register)
Definition: MCStreamer.cpp:602
MD5.h
llvm::MCStreamer::emitVersionForTarget
void emitVersionForTarget(const Triple &Target, const VersionTuple &SDKVersion, const Triple *DarwinTargetVariantTriple, const VersionTuple &DarwinTargetVariantSDKVersion)
Definition: MCStreamer.cpp:1329
llvm::MCStreamer::getMnemonic
virtual StringRef getMnemonic(MCInst &MI)
Returns the mnemonic for MI, if the streamer has access to a instruction printer and returns an empty...
Definition: MCStreamer.h:475
llvm::MCStreamer::getAssociatedPDataSection
MCSection * getAssociatedPDataSection(const MCSection *TextSec)
Get the .pdata section used for the given section.
Definition: MCStreamer.cpp:846
llvm::MCStreamer::emitCFIStartProcImpl
virtual void emitCFIStartProcImpl(MCDwarfFrameInfo &Frame)
Definition: MCStreamer.cpp:470
llvm::MCStreamer::emitWinCFISaveXMM
virtual void emitWinCFISaveXMM(MCRegister Register, unsigned Offset, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:932
llvm::MCStreamer::emitRelocDirective
virtual Optional< std::pair< bool, std::string > > emitRelocDirective(const MCExpr &Offset, StringRef Name, const MCExpr *Expr, SMLoc Loc, const MCSubtargetInfo &STI)
Record a relocation described by the .reloc directive.
Definition: MCStreamer.h:1084
llvm::MCStreamer::operator=
MCStreamer & operator=(const MCStreamer &)=delete
llvm::MCStreamer::emitLabel
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
Definition: MCStreamer.cpp:423
llvm::MCStreamer::switchSection
virtual void switchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
Definition: MCStreamer.cpp:1225
llvm::MCStreamer::emitSymbolValue
void emitSymbolValue(const MCSymbol *Sym, unsigned Size, bool IsSectionRelative=false)
Special case of EmitValue that avoids the client having to pass in a MCExpr for MCSymbols.
Definition: MCStreamer.cpp:182
llvm::MCStreamer::emitIntValueInHexWithPadding
virtual void emitIntValueInHexWithPadding(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers & p...
Definition: MCStreamer.h:744
llvm::MCStreamer::emitWinCFIEndChained
virtual void emitWinCFIEndChained(SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:769
llvm::ARMTargetStreamer::emitArch
virtual void emitArch(ARM::ArchKind Arch)
Definition: ARMTargetStreamer.cpp:112
llvm::MCStreamer::emitWinEHHandlerData
virtual void emitWinEHHandlerData(SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:800
llvm::dwarf::Index
Index
Definition: Dwarf.h:472
llvm::MCStreamer::emitBuildVersion
virtual void emitBuildVersion(unsigned Platform, unsigned Major, unsigned Minor, unsigned Update, VersionTuple SDKVersion)
Emit/Specify Mach-O build version command.
Definition: MCStreamer.h:508
First
into llvm powi allowing the code generator to produce balanced multiplication trees First
Definition: README.txt:54
llvm::MCStreamer::emitAssemblerFlag
virtual void emitAssemblerFlag(MCAssemblerFlag Flag)
Note in the output the specified Flag.
Definition: MCStreamer.cpp:1151
llvm::MCStreamer::hasUnfinishedDwarfFrameInfo
bool hasUnfinishedDwarfFrameInfo()
Definition: MCStreamer.cpp:280
llvm::MCStreamer::finishImpl
virtual void finishImpl()
Streamer specific finalization.
Definition: MCStreamer.cpp:1222
llvm::MCStreamer::switchSectionNoChange
void switchSectionNoChange(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
Definition: MCStreamer.h:453
llvm::MCTargetStreamer::emitConstantPools
virtual void emitConstantPools()
Definition: MCStreamer.cpp:57
llvm::MCID::Flag
Flag
These should be considered private to the implementation of the MCInstrDesc class.
Definition: MCInstrDesc.h:147
llvm::MCStreamer::emitAssignment
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol.
Definition: MCStreamer.cpp:1051
SMLoc.h
llvm::MCStreamer::emitRawComment
virtual void emitRawComment(const Twine &T, bool TabPrefix=true)
Print T and prefix it with the comment string (normally #) and optionally a tab.
Definition: MCStreamer.cpp:121
llvm::MCStreamer::emitCVFileDirective
virtual bool emitCVFileDirective(unsigned FileNo, StringRef Filename, ArrayRef< uint8_t > Checksum, unsigned ChecksumKind)
Associate a filename with a specified logical file number, and also specify that file's checksum info...
Definition: MCStreamer.cpp:294
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54
llvm::MCStreamer::emitCVFileChecksumOffsetDirective
virtual void emitCVFileChecksumOffsetDirective(unsigned FileNo)
This implements the CodeView '.cv_filechecksumoffset' assembler directive.
Definition: MCStreamer.h:1003
llvm::MCStreamer::maybeEmitDwarf64Mark
void maybeEmitDwarf64Mark()
Emit a special value of 0xffffffff if producing 64-bit debugging info.
Definition: MCStreamer.cpp:1016
llvm::VersionTuple
Represents a version number in the form major[.minor[.subminor[.build]]].
Definition: VersionTuple.h:31
llvm::MCTargetStreamer
Target specific streamer interface.
Definition: MCStreamer.h:93
llvm::MCStreamer::emitXCOFFRefDirective
virtual void emitXCOFFRefDirective(StringRef Sym)
Emit a XCOFF .ref directive which creates R_REF type entry in the relocation table for one or more sy...
Definition: MCStreamer.cpp:1189
llvm::MCTargetStreamer::~MCTargetStreamer
virtual ~MCTargetStreamer()
llvm::MCStreamer::emitGPRel32Value
virtual void emitGPRel32Value(const MCExpr *Value)
Emit the expression Value into the output as a gprel32 (32-bit GP relative) value.
Definition: MCStreamer.cpp:213
llvm::MCStreamer::emitTPRel64Value
virtual void emitTPRel64Value(const MCExpr *Value)
Emit the expression Value into the output as a tprel (64-bit TP relative) value.
Definition: MCStreamer.cpp:201
llvm::MCStreamer::visitUsedSymbol
virtual void visitUsedSymbol(const MCSymbol &Sym)
Definition: MCStreamer.cpp:1067
llvm::MCStreamer::addBlankLine
virtual void addBlankLine()
Emit a blank line to a .s file to pretty it up.
Definition: MCStreamer.h:376
llvm::MCStreamer::getCurrentSectionOnly
MCSection * getCurrentSectionOnly() const
Definition: MCStreamer.h:389
llvm::AddressSpace
AddressSpace
Definition: NVPTXBaseInfo.h:21
llvm::MCStreamer::emitCOFFSafeSEH
virtual void emitCOFFSafeSEH(MCSymbol const *Symbol)
Definition: MCStreamer.cpp:971
llvm::MCTargetStreamer::emitAssignment
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
Definition: MCStreamer.cpp:92
llvm::None
const NoneType None
Definition: None.h:24
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::MCStreamer::emitCVInlineSiteIdDirective
virtual bool emitCVInlineSiteIdDirective(unsigned FunctionId, unsigned IAFunc, unsigned IAFile, unsigned IALine, unsigned IACol, SMLoc Loc)
Introduces an inline call site id for use with .cv_loc.
Definition: MCStreamer.cpp:305
llvm::ARMTargetStreamer::emitARMWinCFIPrologEnd
virtual void emitARMWinCFIPrologEnd(bool Fragment)
Definition: ARMTargetStreamer.cpp:127
llvm::MCStreamer::emitNops
virtual void emitNops(int64_t NumBytes, int64_t ControlledNopLength, SMLoc Loc, const MCSubtargetInfo &STI)
Definition: MCStreamer.cpp:223
llvm::MCStreamer::emitBinaryData
virtual void emitBinaryData(StringRef Data)
Functionally identical to EmitBytes.
Definition: MCStreamer.cpp:1203
llvm::MCStreamer::emitCGProfileEntry
virtual void emitCGProfileEntry(const MCSymbolRefExpr *From, const MCSymbolRefExpr *To, uint64_t Count)
Definition: MCStreamer.cpp:808
llvm::MCStreamer::emitSymbolDesc
virtual void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue)
Set the DescValue for the Symbol.
Definition: MCStreamer.cpp:1153
llvm::MCStreamer::emitDwarfFile0Directive
virtual void emitDwarfFile0Directive(StringRef Directory, StringRef Filename, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, unsigned CUID=0)
Specify the "root" file of the compilation, using the ".file 0" extension.
Definition: MCStreamer.cpp:239
llvm::ARMTargetStreamer::emitSetFP
virtual void emitSetFP(unsigned FpReg, unsigned SpReg, int64_t Offset=0)
Definition: ARMTargetStreamer.cpp:96
llvm::MCStreamer::endSection
MCSymbol * endSection(MCSection *Section)
Definition: MCStreamer.cpp:1239
llvm::ARMTargetStreamer::emitARMWinCFISaveRegMask
virtual void emitARMWinCFISaveRegMask(unsigned Mask, bool Wide)
Definition: ARMTargetStreamer.cpp:122
llvm::MCStreamer::emitCOFFSymbolIndex
virtual void emitCOFFSymbolIndex(MCSymbol const *Symbol)
Emits the symbol table index of a Symbol into the current section.
Definition: MCStreamer.cpp:973
llvm::ARMTargetStreamer::emitARMWinCFIEpilogStart
virtual void emitARMWinCFIEpilogStart(unsigned Condition)
Definition: ARMTargetStreamer.cpp:128
llvm::codeview::DefRangeSubfieldRegisterHeader
Definition: SymbolRecord.h:501
llvm::XCOFF::StorageClass
StorageClass
Definition: XCOFF.h:154
llvm::MCStreamer::emitInt16
void emitInt16(uint64_t Value)
Definition: MCStreamer.h:737
llvm::MCStreamer::emitFileDirective
virtual void emitFileDirective(StringRef Filename)
Switch to a new logical file.
Definition: MCStreamer.cpp:1160
llvm::MCStreamer::subSection
bool subSection(const MCExpr *Subsection)
Definition: MCStreamer.h:435
llvm::MCStreamer::emitValueToOffset
virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value, SMLoc Loc)
Emit some number of copies of Value until the byte offset Offset is reached.
Definition: MCStreamer.cpp:1218
llvm::MCAssembler
Definition: MCAssembler.h:73
llvm::MCStreamer::emitConditionalAssignment
virtual void emitConditionalAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol, but only if Value is also emitted.
Definition: MCStreamer.cpp:442
llvm::MCStreamer::beginCOFFSymbolDef
virtual void beginCOFFSymbolDef(const MCSymbol *Symbol)
Start emitting COFF symbol definition.
Definition: MCStreamer.cpp:1154
llvm::ARMTargetStreamer::emitObjectArch
virtual void emitObjectArch(ARM::ArchKind Arch)
Definition: ARMTargetStreamer.cpp:114
llvm::MCStreamer::emitEHSymAttributes
virtual void emitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol)
Definition: MCStreamer.cpp:406
llvm::MCStreamer::addExplicitComment
virtual void addExplicitComment(const Twine &T)
Add explicit comment T.
Definition: MCStreamer.cpp:123
uint64_t
llvm::MCTargetStreamer::Streamer
MCStreamer & Streamer
Definition: MCStreamer.h:95
llvm::MCInstPrinter
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Definition: MCInstPrinter.h:43
llvm::MCStreamer::emitCFIBKeyFrame
virtual void emitCFIBKeyFrame()
Definition: MCStreamer.cpp:248
llvm::MCStreamer::emitRawText
void emitRawText(const Twine &String)
If this file is backed by a assembly streamer, this dumps the specified string in the output ....
Definition: MCStreamer.cpp:993
llvm::MCStreamer::emitSyntaxDirective
virtual void emitSyntaxDirective()
Definition: MCStreamer.cpp:858
llvm::MCStreamer::emitDwarfAdvanceLineAddr
virtual void emitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel, const MCSymbol *Label, unsigned PointerSize)
If targets does not support representing debug line section by .loc/.file directives in assembly outp...
Definition: MCStreamer.h:1148
llvm::ARMTargetStreamer::emitARMWinCFIEpilogEnd
virtual void emitARMWinCFIEpilogEnd()
Definition: ARMTargetStreamer.cpp:129
llvm::MCStreamer::emitIdent
virtual void emitIdent(StringRef IdentString)
Emit the "identifiers" directive.
Definition: MCStreamer.h:898
llvm::DenseMap< const MCSymbol *, unsigned >
llvm::MCStreamer::emitInstruction
virtual void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI)
Emit the given Instruction into the current section.
Definition: MCStreamer.cpp:1096
llvm::ARMTargetStreamer::emitHandlerData
virtual void emitHandlerData()
Definition: ARMTargetStreamer.cpp:95
llvm::ARMTargetStreamer::addConstantPoolEntry
const MCExpr * addConstantPoolEntry(const MCExpr *, SMLoc Loc)
Callback used to implement the ldr= pseudo.
Definition: ARMTargetStreamer.cpp:36
I
#define I(x, y, z)
Definition: MD5.cpp:58
FuncId
Profile::FuncID FuncId
Definition: Profile.cpp:321
llvm::createNullStreamer
MCStreamer * createNullStreamer(MCContext &Ctx)
Create a dummy machine code streamer, which does nothing.
Definition: MCNullStreamer.cpp:56
llvm::codeview::DefRangeRegisterHeader
Definition: SymbolRecord.h:479
llvm::MCStreamer::endCOFFSymbolDef
virtual void endCOFFSymbolDef()
Marks the end of the symbol definition.
Definition: MCStreamer.cpp:1157
llvm::MCStreamer::getAssemblerPtr
virtual MCAssembler * getAssemblerPtr()
Definition: MCStreamer.h:295
ArrayRef.h
ARMTargetParser.h
llvm::MCStreamer::getStartTokLoc
SMLoc getStartTokLoc() const
Definition: MCStreamer.h:285
llvm::MCStreamer::pushSection
void pushSection()
Save the current and previous section on the section stack.
Definition: MCStreamer.h:411
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MCStreamer::emitLOHDirective
virtual void emitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args)
Emit a Linker Optimization Hint (LOH) directive.
Definition: MCStreamer.h:652
llvm::MCStreamer::emitCFIEscape
virtual void emitCFIEscape(StringRef Values)
Definition: MCStreamer.cpp:622
llvm::MCStreamer::emitIntValue
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.
Definition: MCStreamer.cpp:134
llvm::MCStreamer::emitCFIRestore
virtual void emitCFIRestore(int64_t Register)
Definition: MCStreamer.cpp:612
llvm::ARMTargetStreamer::switchVendor
virtual void switchVendor(StringRef Vendor)
Definition: ARMTargetStreamer.cpp:105
llvm::MCStreamer::emitTBSSSymbol
virtual void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment=0)
Emit a thread local bss (.tbss) symbol.
Definition: MCStreamer.cpp:1198
llvm::ARMTargetStreamer::emitThumbSet
virtual void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value)
Definition: ARMTargetStreamer.cpp:119
llvm::MCStreamer::emitCOFFSecRel32
virtual void emitCOFFSecRel32(MCSymbol const *Symbol, uint64_t Offset)
Emits a COFF section relative relocation.
Definition: MCStreamer.cpp:977
llvm::ARMTargetStreamer::emitIntTextAttribute
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue="")
Definition: ARMTargetStreamer.cpp:109
llvm::MCSymbolRefExpr
Represent a reference to a symbol from inside an expression.
Definition: MCExpr.h:192
llvm::MCStreamer::getNumFrameInfos
unsigned getNumFrameInfos()
Definition: MCStreamer.cpp:116
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::codeview::DefRangeRegisterRelHeader
Definition: SymbolRecord.h:551
llvm::Sched::Source
@ Source
Definition: TargetLowering.h:99
llvm::MCStreamer::initSections
virtual void initSections(bool NoExecStack, const MCSubtargetInfo &STI)
Create the default sections and set the initial one.
Definition: MCStreamer.cpp:410
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ARMTargetStreamer::emitPersonalityIndex
virtual void emitPersonalityIndex(unsigned Index)
Definition: ARMTargetStreamer.cpp:94
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::MCStreamer::emitWinCFIEndProlog
virtual void emitWinCFIEndProlog(SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:961
llvm::cantFail
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Definition: Error.h:745
uint32_t
llvm::MCStreamer::emitWinCFIStartChained
virtual void emitWinCFIStartChained(SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:756
llvm::StackOffset
StackOffset is a class to represent an offset with 2 dimensions, named fixed and scalable,...
Definition: TypeSize.h:134
llvm::MCStreamer::getDwarfFrameInfos
ArrayRef< MCDwarfFrameInfo > getDwarfFrameInfos() const
Definition: MCStreamer.cpp:117
llvm::MCStreamer::emitBundleAlignMode
virtual void emitBundleAlignMode(unsigned AlignPow2)
Set the bundle alignment mode from now on in the section.
Definition: MCStreamer.cpp:1220
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::MCStreamer::emitCFIGnuArgsSize
virtual void emitCFIGnuArgsSize(int64_t Size)
Definition: MCStreamer.cpp:631
llvm::MCStreamer::emitWeakReference
virtual void emitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol)
Emit an weak reference from Alias to Symbol.
Definition: MCStreamer.cpp:1201
llvm::MCStreamer::emitWinCFIFuncletOrFuncEnd
virtual void emitWinCFIFuncletOrFuncEnd(SMLoc Loc=SMLoc())
This is used on platforms, such as Windows on ARM64, that require function or funclet sizes to be emi...
Definition: MCStreamer.cpp:745
llvm::MCStreamer::emitWinCFIPushFrame
virtual void emitWinCFIPushFrame(bool Code, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:947
llvm::MCStreamer::emitCFIDefCfa
virtual void emitCFIDefCfa(int64_t Register, int64_t Offset)
Definition: MCStreamer.cpp:492
llvm::MCStreamer::setStartTokLocPtr
void setStartTokLocPtr(const SMLoc *Loc)
Definition: MCStreamer.h:284
llvm::ARMTargetStreamer::emitTargetAttributes
void emitTargetAttributes(const MCSubtargetInfo &STI)
Emit the build attributes that only depend on the hardware that we expect.
Definition: ARMTargetStreamer.cpp:177
llvm::MCStreamer::emitDwarfLineStartLabel
virtual void emitDwarfLineStartLabel(MCSymbol *StartSym)
Emit the debug line start label.
Definition: MCStreamer.cpp:1046
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:83
llvm::MCStreamer::getNumWinFrameInfos
unsigned getNumWinFrameInfos()
Definition: MCStreamer.h:320
llvm::MCStreamer::emitCVFPOData
virtual void emitCVFPOData(const MCSymbol *ProcSym, SMLoc Loc={})
This implements the CodeView '.cv_fpo_data' assembler directive.
Definition: MCStreamer.h:1006
llvm::ARMTargetStreamer::emitTextAttribute
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
Definition: ARMTargetStreamer.cpp:107
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
MCWinEH.h
llvm::ARM::ArchKind
ArchKind
Definition: ARMTargetParser.h:103
llvm::MCStreamer::emitELFSymverDirective
virtual void emitELFSymverDirective(const MCSymbol *OriginalSym, StringRef Name, bool KeepOriginalSym)
Emit an ELF .symver directive.
Definition: MCStreamer.cpp:1194
llvm::ARMTargetStreamer::emitUnwindRaw
virtual void emitUnwindRaw(int64_t StackOffset, const SmallVectorImpl< uint8_t > &Opcodes)
Definition: ARMTargetStreamer.cpp:102
llvm::MCStreamer::emitSLEB128IntValue
void emitSLEB128IntValue(int64_t Value)
Special case of EmitSLEB128Value that avoids the client having to pass in a MCExpr for constant integ...
Definition: MCStreamer.cpp:171
llvm::ARMTargetStreamer::emitMovSP
virtual void emitMovSP(unsigned Reg, int64_t Offset=0)
Definition: ARMTargetStreamer.cpp:98
llvm::MCStreamer::emitSymbolAttribute
virtual bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute)=0
Add the given Attribute to Symbol.
llvm::MCStreamer::emitDwarfLineEndEntry
virtual void emitDwarfLineEndEntry(MCSection *Section, MCSymbol *LastLabel)
Emit the debug line end entry.
Definition: MCStreamer.h:1143
llvm::MCStreamer::emitIntValueInHex
virtual void emitIntValueInHex(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers & p...
Definition: MCStreamer.h:732
llvm::MCStreamer::doFinalizationAtSectionEnd
virtual void doFinalizationAtSectionEnd(MCSection *Section)
Do finalization for the streamer at the end of a section.
Definition: MCStreamer.h:1154
llvm::MCStreamer::emitCVDefRangeDirective
virtual void emitCVDefRangeDirective(ArrayRef< std::pair< const MCSymbol *, const MCSymbol * >> Ranges, StringRef FixedSizePortion)
This implements the CodeView '.cv_def_range' assembler directive.
Definition: MCStreamer.cpp:368
llvm::MCStreamer::emitCFIWindowSave
virtual void emitCFIWindowSave()
Definition: MCStreamer.cpp:668
llvm::MCStreamer::emitCFILsda
virtual void emitCFILsda(const MCSymbol *Sym, unsigned Encoding)
Definition: MCStreamer.cpp:575
llvm::MCStreamer::isIntegratedAssemblerRequired
virtual bool isIntegratedAssemblerRequired() const
Is the integrated assembler required for this streamer to function correctly?
Definition: MCStreamer.h:340
llvm::MCStreamer::emitAbsoluteSymbolDiff
virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size)
Emit the absolute difference between two symbols.
Definition: MCStreamer.cpp:1122
llvm::MCStreamer::emitExplicitComments
virtual void emitExplicitComments()
Emit added explicit comments.
Definition: MCStreamer.cpp:124
llvm::MCStreamer::emitCVStringTableDirective
virtual void emitCVStringTableDirective()
This implements the CodeView '.cv_stringtable' assembler directive.
Definition: MCStreamer.h:996
llvm::MCStreamer::emitSLEB128Value
virtual void emitSLEB128Value(const MCExpr *Value)
Definition: MCStreamer.cpp:1208
llvm::MCStreamer::getWinFrameInfos
ArrayRef< std::unique_ptr< WinEH::FrameInfo > > getWinFrameInfos() const
Definition: MCStreamer.h:321
llvm::MCStreamer::emitBundleUnlock
virtual void emitBundleUnlock()
Ends a bundle-locked group.
Definition: MCStreamer.cpp:1223
llvm::ARMTargetStreamer::emitAttribute
virtual void emitAttribute(unsigned Attribute, unsigned Value)
Definition: ARMTargetStreamer.cpp:106
llvm::MCStreamer::getSymbolOrder
unsigned getSymbolOrder(const MCSymbol *Sym) const
Returns an index to represent the order a symbol was emitted in.
Definition: MCStreamer.h:400
llvm::MCStreamer::emitCFIRememberState
virtual void emitCFIRememberState()
Definition: MCStreamer.cpp:583
llvm::MCStreamer::emitWinCFIEndProc
virtual void emitWinCFIEndProc(SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:727
llvm::LCOMM::ByteAlignment
@ ByteAlignment
Definition: MCAsmInfo.h:50
llvm::ARMTargetStreamer::~ARMTargetStreamer
~ARMTargetStreamer() override
llvm::MCStreamer::checkCVLocSection
bool checkCVLocSection(unsigned FuncId, unsigned FileNo, SMLoc Loc)
Returns true if the the .cv_loc directive is in the right section.
Definition: MCStreamer.cpp:324
llvm::WinEH::FrameInfo
Definition: MCWinEH.h:39
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::MCStreamer::emitCFIEndProc
void emitCFIEndProc()
Definition: MCStreamer.cpp:473
llvm::MCStreamer::getCurrentWinFrameInfo
WinEH::FrameInfo * getCurrentWinFrameInfo()
Definition: MCStreamer.h:259
MCLinkerOptimizationHint.h
llvm::ARMTargetStreamer::emitFnStart
virtual void emitFnStart()
Definition: ARMTargetStreamer.cpp:90
llvm::MCStreamer::~MCStreamer
virtual ~MCStreamer()
llvm::ARMTargetStreamer::emitARMWinCFISaveFRegs
virtual void emitARMWinCFISaveFRegs(unsigned First, unsigned Last)
Definition: ARMTargetStreamer.cpp:124
llvm::LegalityPredicates::isVector
LegalityPredicate isVector(unsigned TypeIdx)
True iff the specified type index is a vector.
Definition: LegalityPredicates.cpp:73
llvm::MCStreamer::finish
void finish(SMLoc EndLoc=SMLoc())
Finish emission of machine code.
Definition: MCStreamer.cpp:1002
llvm::MCStreamer::emitULEB128IntValue
void emitULEB128IntValue(uint64_t Value, unsigned PadTo=0)
Special case of EmitULEB128Value that avoids the client having to pass in a MCExpr for constant integ...
Definition: MCStreamer.cpp:162
llvm::MCStreamer::getContext
MCContext & getContext() const
Definition: MCStreamer.h:293
llvm::MCStreamer::emitCodeAlignment
virtual void emitCodeAlignment(unsigned ByteAlignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
Definition: MCStreamer.cpp:1215
llvm::MCStreamer::emitXCOFFLocalCommonSymbol
virtual void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size, MCSymbol *CsectSym, unsigned ByteAlignment)
Emits an lcomm directive with XCOFF csect information.
Definition: MCStreamer.cpp:1170
llvm::MCStreamer::emitFill
void emitFill(uint64_t NumBytes, uint8_t FillValue)
Emit NumBytes bytes worth of the value specified by FillValue.
Definition: MCStreamer.cpp:219
SmallVector.h
llvm::MCStreamer::getTargetStreamer
MCTargetStreamer * getTargetStreamer()
Definition: MCStreamer.h:300
llvm::MCStreamer::assignFragment
void assignFragment(MCSymbol *Symbol, MCFragment *Fragment)
Sets the symbol's section.
Definition: MCStreamer.cpp:414
llvm::MCStreamer::emitCFIReturnColumn
virtual void emitCFIReturnColumn(int64_t Register)
Definition: MCStreamer.cpp:687
llvm::MCSectionSubPair
std::pair< MCSection *, const MCExpr * > MCSectionSubPair
Definition: MCStreamer.h:66
llvm::ARMTargetStreamer::emitARMWinCFISaveSP
virtual void emitARMWinCFISaveSP(unsigned Reg)
Definition: ARMTargetStreamer.cpp:123
llvm::MCStreamer::emitDwarfLocDirective
virtual void emitDwarfLocDirective(unsigned FileNo, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator, StringRef FileName)
This implements the DWARF2 '.loc fileno lineno ...' assembler directive.
Definition: MCStreamer.cpp:262
llvm::MCStreamer::emitCOFFSectionIndex
virtual void emitCOFFSectionIndex(MCSymbol const *Symbol)
Emits a COFF section index.
Definition: MCStreamer.cpp:975
llvm::MCStreamer::isVerboseAsm
virtual bool isVerboseAsm() const
Return true if this streamer supports verbose assembly and if it is enabled.
Definition: MCStreamer.h:332
llvm::MCStreamer::mayHaveInstructions
virtual bool mayHaveInstructions(MCSection &Sec) const
Definition: MCStreamer.h:1124
llvm::MCStreamer::emitValueToAlignment
virtual void emitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
Definition: MCStreamer.cpp:1212
llvm::ARMTargetStreamer::emitArchExtension
virtual void emitArchExtension(uint64_t ArchExt)
Definition: ARMTargetStreamer.cpp:113
llvm::ARMTargetStreamer::emitARMWinCFISaveLR
virtual void emitARMWinCFISaveLR(unsigned Offset)
Definition: ARMTargetStreamer.cpp:125
llvm::MCTargetStreamer::emitValue
virtual void emitValue(const MCExpr *Value)
Definition: MCStreamer.cpp:72
llvm::MCStreamer::emitZerofill
virtual void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, unsigned ByteAlignment=0, SMLoc Loc=SMLoc())=0
Emit the zerofill section and an optional symbol.
llvm::MCStreamer::emitBytes
virtual void emitBytes(StringRef Data)
Emit the bytes in Data into the output.
Definition: MCStreamer.cpp:1202
llvm::SmallVectorImpl< unsigned >
llvm::MCTargetStreamer::prettyPrintAsm
virtual void prettyPrintAsm(MCInstPrinter &InstPrinter, uint64_t Address, const MCInst &Inst, const MCSubtargetInfo &STI, raw_ostream &OS)
Definition: MCStreamer.cpp:1060
llvm::ARMTargetStreamer::finishAttributeSection
virtual void finishAttributeSection()
Definition: ARMTargetStreamer.cpp:116
llvm::MCTargetStreamer::emitDwarfFileDirective
virtual void emitDwarfFileDirective(StringRef Directive)
Definition: MCStreamer.cpp:68
llvm::MCStreamer::emitRawTextImpl
virtual void emitRawTextImpl(StringRef String)
EmitRawText - If this file is backed by an assembly streamer, this dumps the specified string in the ...
Definition: MCStreamer.cpp:984
From
BlockVerifier::State From
Definition: BlockVerifier.cpp:55
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:394
llvm::lltok::ChecksumKind
@ ChecksumKind
Definition: LLToken.h:432
llvm::ARMTargetStreamer::emitCurrentConstantPool
void emitCurrentConstantPool()
Callback used to implement the .ltorg directive.
Definition: ARMTargetStreamer.cpp:40
llvm::MCStreamer::generateCompactUnwindEncodings
void generateCompactUnwindEncodings(MCAsmBackend *MAB)
Definition: MCStreamer.cpp:126
llvm::MCStreamer::getDwarfLineTableSymbol
virtual MCSymbol * getDwarfLineTableSymbol(unsigned CUID)
Definition: MCStreamer.cpp:270
llvm::ARMTargetStreamer::emitARMWinCFICustom
virtual void emitARMWinCFICustom(unsigned Opcode)
Definition: ARMTargetStreamer.cpp:130
llvm::MCStreamer::emitWinCFIPushReg
virtual void emitWinCFIPushReg(MCRegister Register, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:864
llvm::MCStreamer::emitCFIRestoreState
virtual void emitCFIRestoreState()
Definition: MCStreamer.cpp:592
llvm::MCDwarfFrameInfo
Definition: MCDwarf.h:675
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:76
llvm::MCStreamer::emitCommonSymbol
virtual void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)=0
Emit a common symbol.
llvm::MCStreamer::emitThumbFunc
virtual void emitThumbFunc(MCSymbol *Func)
Note in the output that the specified Func is a Thumb mode function (ARM target only).
Definition: MCStreamer.cpp:1152
llvm::ARMTargetStreamer::emitFPU
virtual void emitFPU(unsigned FPU)
Definition: ARMTargetStreamer.cpp:115
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::ARMTargetStreamer::emitConstantPools
void emitConstantPools() override
Definition: ARMTargetStreamer.cpp:46
llvm::Directive
Definition: DirectiveEmitter.h:100
llvm::MCExpr
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
llvm::MCStreamer::emitCOFFImgRel32
virtual void emitCOFFImgRel32(MCSymbol const *Symbol, int64_t Offset)
Emits a COFF image relative relocation.
Definition: MCStreamer.cpp:979
llvm::MCStreamer::reset
virtual void reset()
State management.
Definition: MCStreamer.cpp:102
llvm::MCStreamer::tryEmitDwarfFileDirective
virtual Expected< unsigned > tryEmitDwarfFileDirective(unsigned FileNo, StringRef Directory, StringRef Filename, Optional< MD5::MD5Result > Checksum=None, Optional< StringRef > Source=None, unsigned CUID=0)
Associate a filename with a specified logical file number.
Definition: MCStreamer.cpp:230
llvm::MCStreamer::emitWinCFIStartProc
virtual void emitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc=SMLoc())
Definition: MCStreamer.cpp:709
llvm::MCStreamer::AddComment
virtual void AddComment(const Twine &T, bool EOL=true)
Add a textual comment.
Definition: MCStreamer.h:355
llvm::MCStreamer::emitCFINegateRAState
virtual void emitCFINegateRAState()
Definition: MCStreamer.cpp:678
llvm::MCStreamer::emitLocalCommonSymbol
virtual void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment)
Emit a local common (.lcomm) symbol.
Definition: MCStreamer.cpp:1196
llvm::ISD::MCSymbol
@ MCSymbol
Definition: ISDOpcodes.h:172
llvm::MCStreamer::emitDwarfFileDirective
unsigned emitDwarfFileDirective(unsigned FileNo, StringRef Directory, StringRef Filename, Optional< MD5::MD5Result > Checksum=None, Optional< StringRef > Source=None, unsigned CUID=0)
Associate a filename with a specified logical file number.
Definition: MCStreamer.h:902
llvm::MCStreamer::emitGNUAttribute
virtual void emitGNUAttribute(unsigned Tag, unsigned Value)
Emit a .gnu_attribute directive.
Definition: MCStreamer.h:655
llvm::ARMTargetStreamer::annotateTLSDescriptorSequence
virtual void annotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE)
Definition: ARMTargetStreamer.cpp:117
llvm::MCStreamer::emitZeros
void emitZeros(uint64_t NumBytes)
Emit NumBytes worth of zeros.
Definition: MCStreamer.cpp:227
llvm::MCStreamer::emitCFIMTETaggedFrame
virtual void emitCFIMTETaggedFrame()
Definition: MCStreamer.cpp:255