MCStreamer.h revision 3185f5c35322cbd10040ab20f265042d477efe62
1//===- MCStreamer.h - High-level Streaming Machine Code Output --*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file declares the MCStreamer class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_MC_MCSTREAMER_H
15#define LLVM_MC_MCSTREAMER_H
16
17#include "llvm/ADT/SmallVector.h"
18#include "llvm/Support/DataTypes.h"
19#include "llvm/MC/MCDirectives.h"
20#include "llvm/MC/MCDwarf.h"
21#include "llvm/MC/MCWin64EH.h"
22
23namespace llvm {
24  class MCAsmInfo;
25  class MCCodeEmitter;
26  class MCContext;
27  class MCExpr;
28  class MCInst;
29  class MCInstPrinter;
30  class MCSection;
31  class MCSymbol;
32  class StringRef;
33  class TargetAsmBackend;
34  class TargetLoweringObjectFile;
35  class Twine;
36  class raw_ostream;
37  class formatted_raw_ostream;
38
39  /// MCStreamer - Streaming machine code generation interface.  This interface
40  /// is intended to provide a programatic interface that is very similar to the
41  /// level that an assembler .s file provides.  It has callbacks to emit bytes,
42  /// handle directives, etc.  The implementation of this interface retains
43  /// state to know what the current section is etc.
44  ///
45  /// There are multiple implementations of this interface: one for writing out
46  /// a .s file, and implementations that write out .o files of various formats.
47  ///
48  class MCStreamer {
49    MCContext &Context;
50
51    MCStreamer(const MCStreamer&); // DO NOT IMPLEMENT
52    MCStreamer &operator=(const MCStreamer&); // DO NOT IMPLEMENT
53
54    bool EmitEHFrame;
55    bool EmitDebugFrame;
56
57    std::vector<MCDwarfFrameInfo> FrameInfos;
58    MCDwarfFrameInfo *getCurrentFrameInfo();
59    void EnsureValidFrame();
60
61    std::vector<MCWin64EHUnwindInfo> W64UnwindInfos;
62    MCWin64EHUnwindInfo *CurrentW64UnwindInfo;
63    void setCurrentW64UnwindInfo(MCWin64EHUnwindInfo *Frame);
64    void EnsureValidW64UnwindInfo();
65
66    const MCSymbol* LastNonPrivate;
67
68    /// SectionStack - This is stack of current and previous section
69    /// values saved by PushSection.
70    SmallVector<std::pair<const MCSection *,
71                const MCSection *>, 4> SectionStack;
72
73  protected:
74    MCStreamer(MCContext &Ctx);
75
76    const MCExpr *BuildSymbolDiff(MCContext &Context, const MCSymbol *A,
77                                  const MCSymbol *B);
78
79    const MCExpr *ForceExpAbs(const MCExpr* Expr);
80
81    void EmitFrames(bool usingCFI);
82
83    MCWin64EHUnwindInfo *getCurrentW64UnwindInfo(){return CurrentW64UnwindInfo;}
84
85  public:
86    virtual ~MCStreamer();
87
88    MCContext &getContext() const { return Context; }
89
90    unsigned getNumFrameInfos() {
91      return FrameInfos.size();
92    }
93
94    const MCDwarfFrameInfo &getFrameInfo(unsigned i) {
95      return FrameInfos[i];
96    }
97
98    /// @name Assembly File Formatting.
99    /// @{
100
101    /// isVerboseAsm - Return true if this streamer supports verbose assembly
102    /// and if it is enabled.
103    virtual bool isVerboseAsm() const { return false; }
104
105    /// hasRawTextSupport - Return true if this asm streamer supports emitting
106    /// unformatted text to the .s file with EmitRawText.
107    virtual bool hasRawTextSupport() const { return false; }
108
109    /// AddComment - Add a comment that can be emitted to the generated .s
110    /// file if applicable as a QoI issue to make the output of the compiler
111    /// more readable.  This only affects the MCAsmStreamer, and only when
112    /// verbose assembly output is enabled.
113    ///
114    /// If the comment includes embedded \n's, they will each get the comment
115    /// prefix as appropriate.  The added comment should not end with a \n.
116    virtual void AddComment(const Twine &T) {}
117
118    /// GetCommentOS - Return a raw_ostream that comments can be written to.
119    /// Unlike AddComment, you are required to terminate comments with \n if you
120    /// use this method.
121    virtual raw_ostream &GetCommentOS();
122
123    /// AddBlankLine - Emit a blank line to a .s file to pretty it up.
124    virtual void AddBlankLine() {}
125
126    /// @}
127
128    /// @name Symbol & Section Management
129    /// @{
130
131    /// getCurrentSection - Return the current section that the streamer is
132    /// emitting code to.
133    const MCSection *getCurrentSection() const {
134      if (!SectionStack.empty())
135        return SectionStack.back().first;
136      return NULL;
137    }
138
139    /// getPreviousSection - Return the previous section that the streamer is
140    /// emitting code to.
141    const MCSection *getPreviousSection() const {
142      if (!SectionStack.empty())
143        return SectionStack.back().second;
144      return NULL;
145    }
146
147    /// ChangeSection - Update streamer for a new active section.
148    ///
149    /// This is called by PopSection and SwitchSection, if the current
150    /// section changes.
151    virtual void ChangeSection(const MCSection *) = 0;
152
153    /// pushSection - Save the current and previous section on the
154    /// section stack.
155    void PushSection() {
156      SectionStack.push_back(std::make_pair(getCurrentSection(),
157                                            getPreviousSection()));
158    }
159
160    /// popSection - Restore the current and previous section from
161    /// the section stack.  Calls ChangeSection as needed.
162    ///
163    /// Returns false if the stack was empty.
164    bool PopSection() {
165      if (SectionStack.size() <= 1)
166        return false;
167      const MCSection *oldSection = SectionStack.pop_back_val().first;
168      const MCSection *curSection = SectionStack.back().first;
169
170      if (oldSection != curSection)
171        ChangeSection(curSection);
172      return true;
173    }
174
175    /// SwitchSection - Set the current section where code is being emitted to
176    /// @p Section.  This is required to update CurSection.
177    ///
178    /// This corresponds to assembler directives like .section, .text, etc.
179    void SwitchSection(const MCSection *Section) {
180      assert(Section && "Cannot switch to a null section!");
181      const MCSection *curSection = SectionStack.back().first;
182      SectionStack.back().second = curSection;
183      if (Section != curSection) {
184        SectionStack.back().first = Section;
185        ChangeSection(Section);
186      }
187    }
188
189    /// InitSections - Create the default sections and set the initial one.
190    virtual void InitSections() = 0;
191
192    /// EmitLabel - Emit a label for @p Symbol into the current section.
193    ///
194    /// This corresponds to an assembler statement such as:
195    ///   foo:
196    ///
197    /// @param Symbol - The symbol to emit. A given symbol should only be
198    /// emitted as a label once, and symbols emitted as a label should never be
199    /// used in an assignment.
200    virtual void EmitLabel(MCSymbol *Symbol);
201
202    virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
203                                     MCSymbol *EHSymbol);
204
205    /// EmitAssemblerFlag - Note in the output the specified @p Flag
206    virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) = 0;
207
208    /// EmitThumbFunc - Note in the output that the specified @p Func is
209    /// a Thumb mode function (ARM target only).
210    virtual void EmitThumbFunc(MCSymbol *Func) = 0;
211
212    /// EmitAssignment - Emit an assignment of @p Value to @p Symbol.
213    ///
214    /// This corresponds to an assembler statement such as:
215    ///  symbol = value
216    ///
217    /// The assignment generates no code, but has the side effect of binding the
218    /// value in the current context. For the assembly streamer, this prints the
219    /// binding into the .s file.
220    ///
221    /// @param Symbol - The symbol being assigned to.
222    /// @param Value - The value for the symbol.
223    virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) = 0;
224
225    /// EmitWeakReference - Emit an weak reference from @p Alias to @p Symbol.
226    ///
227    /// This corresponds to an assembler statement such as:
228    ///  .weakref alias, symbol
229    ///
230    /// @param Alias - The alias that is being created.
231    /// @param Symbol - The symbol being aliased.
232    virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) = 0;
233
234    /// EmitSymbolAttribute - Add the given @p Attribute to @p Symbol.
235    virtual void EmitSymbolAttribute(MCSymbol *Symbol,
236                                     MCSymbolAttr Attribute) = 0;
237
238    /// EmitSymbolDesc - Set the @p DescValue for the @p Symbol.
239    ///
240    /// @param Symbol - The symbol to have its n_desc field set.
241    /// @param DescValue - The value to set into the n_desc field.
242    virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) = 0;
243
244    /// BeginCOFFSymbolDef - Start emitting COFF symbol definition
245    ///
246    /// @param Symbol - The symbol to have its External & Type fields set.
247    virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) = 0;
248
249    /// EmitCOFFSymbolStorageClass - Emit the storage class of the symbol.
250    ///
251    /// @param StorageClass - The storage class the symbol should have.
252    virtual void EmitCOFFSymbolStorageClass(int StorageClass) = 0;
253
254    /// EmitCOFFSymbolType - Emit the type of the symbol.
255    ///
256    /// @param Type - A COFF type identifier (see COFF::SymbolType in X86COFF.h)
257    virtual void EmitCOFFSymbolType(int Type) = 0;
258
259    /// EndCOFFSymbolDef - Marks the end of the symbol definition.
260    virtual void EndCOFFSymbolDef() = 0;
261
262    /// EmitELFSize - Emit an ELF .size directive.
263    ///
264    /// This corresponds to an assembler statement such as:
265    ///  .size symbol, expression
266    ///
267    virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) = 0;
268
269    /// EmitCommonSymbol - Emit a common symbol.
270    ///
271    /// @param Symbol - The common symbol to emit.
272    /// @param Size - The size of the common symbol.
273    /// @param ByteAlignment - The alignment of the symbol if
274    /// non-zero. This must be a power of 2.
275    virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
276                                  unsigned ByteAlignment) = 0;
277
278    /// EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
279    ///
280    /// @param Symbol - The common symbol to emit.
281    /// @param Size - The size of the common symbol.
282    virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) = 0;
283
284    /// EmitZerofill - Emit the zerofill section and an optional symbol.
285    ///
286    /// @param Section - The zerofill section to create and or to put the symbol
287    /// @param Symbol - The zerofill symbol to emit, if non-NULL.
288    /// @param Size - The size of the zerofill symbol.
289    /// @param ByteAlignment - The alignment of the zerofill symbol if
290    /// non-zero. This must be a power of 2 on some targets.
291    virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
292                              unsigned Size = 0,unsigned ByteAlignment = 0) = 0;
293
294    /// EmitTBSSSymbol - Emit a thread local bss (.tbss) symbol.
295    ///
296    /// @param Section - The thread local common section.
297    /// @param Symbol - The thread local common symbol to emit.
298    /// @param Size - The size of the symbol.
299    /// @param ByteAlignment - The alignment of the thread local common symbol
300    /// if non-zero.  This must be a power of 2 on some targets.
301    virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
302                                uint64_t Size, unsigned ByteAlignment = 0) = 0;
303
304    /// @}
305    /// @name Generating Data
306    /// @{
307
308    /// EmitBytes - Emit the bytes in \arg Data into the output.
309    ///
310    /// This is used to implement assembler directives such as .byte, .ascii,
311    /// etc.
312    virtual void EmitBytes(StringRef Data, unsigned AddrSpace) = 0;
313
314    /// EmitValue - Emit the expression @p Value into the output as a native
315    /// integer of the given @p Size bytes.
316    ///
317    /// This is used to implement assembler directives such as .word, .quad,
318    /// etc.
319    ///
320    /// @param Value - The value to emit.
321    /// @param Size - The size of the integer (in bytes) to emit. This must
322    /// match a native machine width.
323    virtual void EmitValueImpl(const MCExpr *Value, unsigned Size,
324                               unsigned AddrSpace) = 0;
325
326    void EmitValue(const MCExpr *Value, unsigned Size, unsigned AddrSpace = 0);
327
328    /// EmitIntValue - Special case of EmitValue that avoids the client having
329    /// to pass in a MCExpr for constant integers.
330    virtual void EmitIntValue(uint64_t Value, unsigned Size,
331                              unsigned AddrSpace = 0);
332
333    /// EmitAbsValue - Emit the Value, but try to avoid relocations. On MachO
334    /// this is done by producing
335    /// foo = value
336    /// .long foo
337    void EmitAbsValue(const MCExpr *Value, unsigned Size,
338                      unsigned AddrSpace = 0);
339
340    virtual void EmitULEB128Value(const MCExpr *Value) = 0;
341
342    virtual void EmitSLEB128Value(const MCExpr *Value) = 0;
343
344    /// EmitULEB128Value - Special case of EmitULEB128Value that avoids the
345    /// client having to pass in a MCExpr for constant integers.
346    void EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace = 0);
347
348    /// EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the
349    /// client having to pass in a MCExpr for constant integers.
350    void EmitSLEB128IntValue(int64_t Value, unsigned AddrSpace = 0);
351
352    /// EmitSymbolValue - Special case of EmitValue that avoids the client
353    /// having to pass in a MCExpr for MCSymbols.
354    void EmitSymbolValue(const MCSymbol *Sym, unsigned Size,
355                         unsigned AddrSpace = 0);
356
357    /// EmitGPRel32Value - Emit the expression @p Value into the output as a
358    /// gprel32 (32-bit GP relative) value.
359    ///
360    /// This is used to implement assembler directives such as .gprel32 on
361    /// targets that support them.
362    virtual void EmitGPRel32Value(const MCExpr *Value);
363
364    /// EmitFill - Emit NumBytes bytes worth of the value specified by
365    /// FillValue.  This implements directives such as '.space'.
366    virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue,
367                          unsigned AddrSpace);
368
369    /// EmitZeros - Emit NumBytes worth of zeros.  This is a convenience
370    /// function that just wraps EmitFill.
371    void EmitZeros(uint64_t NumBytes, unsigned AddrSpace) {
372      EmitFill(NumBytes, 0, AddrSpace);
373    }
374
375
376    /// EmitValueToAlignment - Emit some number of copies of @p Value until
377    /// the byte alignment @p ByteAlignment is reached.
378    ///
379    /// If the number of bytes need to emit for the alignment is not a multiple
380    /// of @p ValueSize, then the contents of the emitted fill bytes is
381    /// undefined.
382    ///
383    /// This used to implement the .align assembler directive.
384    ///
385    /// @param ByteAlignment - The alignment to reach. This must be a power of
386    /// two on some targets.
387    /// @param Value - The value to use when filling bytes.
388    /// @param ValueSize - The size of the integer (in bytes) to emit for
389    /// @p Value. This must match a native machine width.
390    /// @param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
391    /// the alignment cannot be reached in this many bytes, no bytes are
392    /// emitted.
393    virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
394                                      unsigned ValueSize = 1,
395                                      unsigned MaxBytesToEmit = 0) = 0;
396
397    /// EmitCodeAlignment - Emit nops until the byte alignment @p ByteAlignment
398    /// is reached.
399    ///
400    /// This used to align code where the alignment bytes may be executed.  This
401    /// can emit different bytes for different sizes to optimize execution.
402    ///
403    /// @param ByteAlignment - The alignment to reach. This must be a power of
404    /// two on some targets.
405    /// @param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
406    /// the alignment cannot be reached in this many bytes, no bytes are
407    /// emitted.
408    virtual void EmitCodeAlignment(unsigned ByteAlignment,
409                                   unsigned MaxBytesToEmit = 0) = 0;
410
411    /// EmitValueToOffset - Emit some number of copies of @p Value until the
412    /// byte offset @p Offset is reached.
413    ///
414    /// This is used to implement assembler directives such as .org.
415    ///
416    /// @param Offset - The offset to reach. This may be an expression, but the
417    /// expression must be associated with the current section.
418    /// @param Value - The value to use when filling bytes.
419    virtual void EmitValueToOffset(const MCExpr *Offset,
420                                   unsigned char Value = 0) = 0;
421
422    /// @}
423
424    /// EmitFileDirective - Switch to a new logical file.  This is used to
425    /// implement the '.file "foo.c"' assembler directive.
426    virtual void EmitFileDirective(StringRef Filename) = 0;
427
428    /// EmitDwarfFileDirective - Associate a filename with a specified logical
429    /// file number.  This implements the DWARF2 '.file 4 "foo.c"' assembler
430    /// directive.
431    virtual bool EmitDwarfFileDirective(unsigned FileNo,StringRef Filename);
432
433    /// EmitDwarfLocDirective - This implements the DWARF2
434    // '.loc fileno lineno ...' assembler directive.
435    virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
436                                       unsigned Column, unsigned Flags,
437                                       unsigned Isa,
438                                       unsigned Discriminator,
439                                       StringRef FileName);
440
441    virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
442                                          const MCSymbol *LastLabel,
443                                          const MCSymbol *Label) = 0;
444
445    virtual void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
446                                           const MCSymbol *Label) {
447    }
448
449    void EmitDwarfSetLineAddr(int64_t LineDelta, const MCSymbol *Label,
450                              int PointerSize);
451
452    virtual void EmitCFISections(bool EH, bool Debug);
453    virtual void EmitCFIStartProc();
454    virtual void EmitCFIEndProc();
455    virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset);
456    virtual void EmitCFIDefCfaOffset(int64_t Offset);
457    virtual void EmitCFIDefCfaRegister(int64_t Register);
458    virtual void EmitCFIOffset(int64_t Register, int64_t Offset);
459    virtual void EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding);
460    virtual void EmitCFILsda(const MCSymbol *Sym, unsigned Encoding);
461    virtual void EmitCFIRememberState();
462    virtual void EmitCFIRestoreState();
463    virtual void EmitCFISameValue(int64_t Register);
464    virtual void EmitCFIRelOffset(int64_t Register, int64_t Offset);
465    virtual void EmitCFIAdjustCfaOffset(int64_t Adjustment);
466
467    virtual void EmitWin64EHStartProc(MCSymbol *Symbol);
468    virtual void EmitWin64EHEndProc();
469    virtual void EmitWin64EHStartChained();
470    virtual void EmitWin64EHEndChained();
471    virtual void EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
472                                    bool Except);
473    virtual void EmitWin64EHHandlerData();
474    virtual void EmitWin64EHPushReg(unsigned Register);
475    virtual void EmitWin64EHSetFrame(unsigned Register, unsigned Offset);
476    virtual void EmitWin64EHAllocStack(unsigned Size);
477    virtual void EmitWin64EHSaveReg(unsigned Register, unsigned Offset);
478    virtual void EmitWin64EHSaveXMM(unsigned Register, unsigned Offset);
479    virtual void EmitWin64EHPushFrame(bool Code);
480    virtual void EmitWin64EHEndProlog();
481
482    /// EmitInstruction - Emit the given @p Instruction into the current
483    /// section.
484    virtual void EmitInstruction(const MCInst &Inst) = 0;
485
486    /// EmitRawText - If this file is backed by a assembly streamer, this dumps
487    /// the specified string in the output .s file.  This capability is
488    /// indicated by the hasRawTextSupport() predicate.  By default this aborts.
489    virtual void EmitRawText(StringRef String);
490    void EmitRawText(const Twine &String);
491
492    /// ARM-related methods.
493    /// FIXME: Eventually we should have some "target MC streamer" and move
494    /// these methods there.
495    virtual void EmitFnStart();
496    virtual void EmitFnEnd();
497    virtual void EmitCantUnwind();
498    virtual void EmitPersonality(const MCSymbol *Personality);
499    virtual void EmitHandlerData();
500    virtual void EmitSetFP(unsigned FpReg, unsigned SpReg, int64_t Offset = 0);
501    virtual void EmitPad(int64_t Offset);
502    virtual void EmitRegSave(const SmallVectorImpl<unsigned> &RegList,
503                             bool isVector);
504
505    /// Finish - Finish emission of machine code.
506    virtual void Finish() = 0;
507  };
508
509  /// createNullStreamer - Create a dummy machine code streamer, which does
510  /// nothing. This is useful for timing the assembler front end.
511  MCStreamer *createNullStreamer(MCContext &Ctx);
512
513  /// createAsmStreamer - Create a machine code streamer which will print out
514  /// assembly for the native target, suitable for compiling with a native
515  /// assembler.
516  ///
517  /// \param InstPrint - If given, the instruction printer to use. If not given
518  /// the MCInst representation will be printed.  This method takes ownership of
519  /// InstPrint.
520  ///
521  /// \param CE - If given, a code emitter to use to show the instruction
522  /// encoding inline with the assembly. This method takes ownership of \arg CE.
523  ///
524  /// \param TAB - If given, a target asm backend to use to show the fixup
525  /// information in conjunction with encoding information. This method takes
526  /// ownership of \arg TAB.
527  ///
528  /// \param ShowInst - Whether to show the MCInst representation inline with
529  /// the assembly.
530  MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS,
531                                bool isVerboseAsm,
532                                bool useLoc,
533                                bool useCFI,
534                                MCInstPrinter *InstPrint = 0,
535                                MCCodeEmitter *CE = 0,
536                                TargetAsmBackend *TAB = 0,
537                                bool ShowInst = false);
538
539  /// createMachOStreamer - Create a machine code streamer which will generate
540  /// Mach-O format object files.
541  ///
542  /// Takes ownership of \arg TAB and \arg CE.
543  MCStreamer *createMachOStreamer(MCContext &Ctx, TargetAsmBackend &TAB,
544                                  raw_ostream &OS, MCCodeEmitter *CE,
545                                  bool RelaxAll = false);
546
547  /// createWinCOFFStreamer - Create a machine code streamer which will
548  /// generate Microsoft COFF format object files.
549  ///
550  /// Takes ownership of \arg TAB and \arg CE.
551  MCStreamer *createWinCOFFStreamer(MCContext &Ctx,
552                                    TargetAsmBackend &TAB,
553                                    MCCodeEmitter &CE, raw_ostream &OS,
554                                    bool RelaxAll = false);
555
556  /// createELFStreamer - Create a machine code streamer which will generate
557  /// ELF format object files.
558  MCStreamer *createELFStreamer(MCContext &Ctx, TargetAsmBackend &TAB,
559				raw_ostream &OS, MCCodeEmitter *CE,
560				bool RelaxAll, bool NoExecStack);
561
562  /// createLoggingStreamer - Create a machine code streamer which just logs the
563  /// API calls and then dispatches to another streamer.
564  ///
565  /// The new streamer takes ownership of the \arg Child.
566  MCStreamer *createLoggingStreamer(MCStreamer *Child, raw_ostream &OS);
567
568  /// createPureStreamer - Create a machine code streamer which will generate
569  /// "pure" MC object files, for use with MC-JIT and testing tools.
570  ///
571  /// Takes ownership of \arg TAB and \arg CE.
572  MCStreamer *createPureStreamer(MCContext &Ctx, TargetAsmBackend &TAB,
573                                 raw_ostream &OS, MCCodeEmitter *CE);
574
575} // end namespace llvm
576
577#endif
578