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