1 //===- MCStreamer.h - High-level Streaming Machine Code Output --*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the MCStreamer class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_MC_MCSTREAMER_H
15 #define LLVM_MC_MCSTREAMER_H
17 #include "llvm/Support/DataTypes.h"
18 #include "llvm/MC/MCDirectives.h"
19 #include "llvm/MC/MCDwarf.h"
20 #include "llvm/MC/MCWin64EH.h"
21 #include "llvm/ADT/ArrayRef.h"
22 #include "llvm/ADT/SmallVector.h"
35 class TargetLoweringObjectFile;
38 class formatted_raw_ostream;
40 /// MCStreamer - Streaming machine code generation interface. This interface
41 /// is intended to provide a programatic interface that is very similar to the
42 /// level that an assembler .s file provides. It has callbacks to emit bytes,
43 /// handle directives, etc. The implementation of this interface retains
44 /// state to know what the current section is etc.
46 /// There are multiple implementations of this interface: one for writing out
47 /// a .s file, and implementations that write out .o files of various formats.
52 MCStreamer(const MCStreamer&); // DO NOT IMPLEMENT
53 MCStreamer &operator=(const MCStreamer&); // DO NOT IMPLEMENT
58 std::vector<MCDwarfFrameInfo> FrameInfos;
59 MCDwarfFrameInfo *getCurrentFrameInfo();
60 void EnsureValidFrame();
62 std::vector<MCWin64EHUnwindInfo *> W64UnwindInfos;
63 MCWin64EHUnwindInfo *CurrentW64UnwindInfo;
64 void setCurrentW64UnwindInfo(MCWin64EHUnwindInfo *Frame);
65 void EnsureValidW64UnwindInfo();
69 /// SectionStack - This is stack of current and previous section
70 /// values saved by PushSection.
71 SmallVector<std::pair<const MCSection *,
72 const MCSection *>, 4> SectionStack;
74 unsigned UniqueCodeBeginSuffix;
75 unsigned UniqueDataBeginSuffix;
78 /// Indicator of whether the previous data-or-code indicator was for
79 /// code or not. Used to determine when we need to emit a new indicator.
87 DataType RegionIndicator;
90 MCStreamer(MCContext &Ctx);
92 const MCExpr *BuildSymbolDiff(MCContext &Context, const MCSymbol *A,
95 const MCExpr *ForceExpAbs(const MCExpr* Expr);
97 void EmitFrames(bool usingCFI);
99 MCWin64EHUnwindInfo *getCurrentW64UnwindInfo(){return CurrentW64UnwindInfo;}
100 void EmitW64Tables();
103 virtual ~MCStreamer();
105 MCContext &getContext() const { return Context; }
107 unsigned getNumFrameInfos() {
108 return FrameInfos.size();
111 const MCDwarfFrameInfo &getFrameInfo(unsigned i) {
112 return FrameInfos[i];
115 ArrayRef<MCDwarfFrameInfo> getFrameInfos() {
119 unsigned getNumW64UnwindInfos() {
120 return W64UnwindInfos.size();
123 MCWin64EHUnwindInfo &getW64UnwindInfo(unsigned i) {
124 return *W64UnwindInfos[i];
127 /// @name Assembly File Formatting.
130 /// isVerboseAsm - Return true if this streamer supports verbose assembly
131 /// and if it is enabled.
132 virtual bool isVerboseAsm() const { return false; }
134 /// hasRawTextSupport - Return true if this asm streamer supports emitting
135 /// unformatted text to the .s file with EmitRawText.
136 virtual bool hasRawTextSupport() const { return false; }
138 /// AddComment - Add a comment that can be emitted to the generated .s
139 /// file if applicable as a QoI issue to make the output of the compiler
140 /// more readable. This only affects the MCAsmStreamer, and only when
141 /// verbose assembly output is enabled.
143 /// If the comment includes embedded \n's, they will each get the comment
144 /// prefix as appropriate. The added comment should not end with a \n.
145 virtual void AddComment(const Twine &T) {}
147 /// GetCommentOS - Return a raw_ostream that comments can be written to.
148 /// Unlike AddComment, you are required to terminate comments with \n if you
150 virtual raw_ostream &GetCommentOS();
152 /// AddBlankLine - Emit a blank line to a .s file to pretty it up.
153 virtual void AddBlankLine() {}
157 /// @name Symbol & Section Management
160 /// getCurrentSection - Return the current section that the streamer is
161 /// emitting code to.
162 const MCSection *getCurrentSection() const {
163 if (!SectionStack.empty())
164 return SectionStack.back().first;
168 /// getPreviousSection - Return the previous section that the streamer is
169 /// emitting code to.
170 const MCSection *getPreviousSection() const {
171 if (!SectionStack.empty())
172 return SectionStack.back().second;
176 /// ChangeSection - Update streamer for a new active section.
178 /// This is called by PopSection and SwitchSection, if the current
180 virtual void ChangeSection(const MCSection *) = 0;
182 /// pushSection - Save the current and previous section on the
185 SectionStack.push_back(std::make_pair(getCurrentSection(),
186 getPreviousSection()));
189 /// popSection - Restore the current and previous section from
190 /// the section stack. Calls ChangeSection as needed.
192 /// Returns false if the stack was empty.
194 if (SectionStack.size() <= 1)
196 const MCSection *oldSection = SectionStack.pop_back_val().first;
197 const MCSection *curSection = SectionStack.back().first;
199 if (oldSection != curSection)
200 ChangeSection(curSection);
204 /// SwitchSection - Set the current section where code is being emitted to
205 /// @p Section. This is required to update CurSection.
207 /// This corresponds to assembler directives like .section, .text, etc.
208 void SwitchSection(const MCSection *Section) {
209 assert(Section && "Cannot switch to a null section!");
210 const MCSection *curSection = SectionStack.back().first;
211 SectionStack.back().second = curSection;
212 if (Section != curSection) {
213 SectionStack.back().first = Section;
214 ChangeSection(Section);
218 /// SwitchSectionNoChange - Set the current section where code is being
219 /// emitted to @p Section. This is required to update CurSection. This
220 /// version does not call ChangeSection.
221 void SwitchSectionNoChange(const MCSection *Section) {
222 assert(Section && "Cannot switch to a null section!");
223 const MCSection *curSection = SectionStack.back().first;
224 SectionStack.back().second = curSection;
225 if (Section != curSection)
226 SectionStack.back().first = Section;
229 /// InitSections - Create the default sections and set the initial one.
230 virtual void InitSections() = 0;
232 /// EmitLabel - Emit a label for @p Symbol into the current section.
234 /// This corresponds to an assembler statement such as:
237 /// @param Symbol - The symbol to emit. A given symbol should only be
238 /// emitted as a label once, and symbols emitted as a label should never be
239 /// used in an assignment.
240 virtual void EmitLabel(MCSymbol *Symbol);
242 /// EmitDataRegion - Emit a label that marks the beginning of a data
244 /// On ELF targets, this corresponds to an assembler statement such as:
246 virtual void EmitDataRegion();
248 /// EmitJumpTable8Region - Emit a label that marks the beginning of a
249 /// jump table composed of 8-bit offsets.
250 /// On ELF targets, this corresponds to an assembler statement such as:
252 virtual void EmitJumpTable8Region();
254 /// EmitJumpTable16Region - Emit a label that marks the beginning of a
255 /// jump table composed of 16-bit offsets.
256 /// On ELF targets, this corresponds to an assembler statement such as:
258 virtual void EmitJumpTable16Region();
260 /// EmitJumpTable32Region - Emit a label that marks the beginning of a
261 /// jump table composed of 32-bit offsets.
262 /// On ELF targets, this corresponds to an assembler statement such as:
264 virtual void EmitJumpTable32Region();
266 /// EmitCodeRegion - Emit a label that marks the beginning of a code
268 /// On ELF targets, this corresponds to an assembler statement such as:
270 virtual void EmitCodeRegion();
272 /// ForceCodeRegion - Forcibly sets the current region mode to code. Used
273 /// at function entry points.
274 void ForceCodeRegion() { RegionIndicator = Code; }
277 virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
280 /// EmitAssemblerFlag - Note in the output the specified @p Flag
281 virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) = 0;
283 /// EmitThumbFunc - Note in the output that the specified @p Func is
284 /// a Thumb mode function (ARM target only).
285 virtual void EmitThumbFunc(MCSymbol *Func) = 0;
287 /// EmitAssignment - Emit an assignment of @p Value to @p Symbol.
289 /// This corresponds to an assembler statement such as:
292 /// The assignment generates no code, but has the side effect of binding the
293 /// value in the current context. For the assembly streamer, this prints the
294 /// binding into the .s file.
296 /// @param Symbol - The symbol being assigned to.
297 /// @param Value - The value for the symbol.
298 virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) = 0;
300 /// EmitWeakReference - Emit an weak reference from @p Alias to @p Symbol.
302 /// This corresponds to an assembler statement such as:
303 /// .weakref alias, symbol
305 /// @param Alias - The alias that is being created.
306 /// @param Symbol - The symbol being aliased.
307 virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) = 0;
309 /// EmitSymbolAttribute - Add the given @p Attribute to @p Symbol.
310 virtual void EmitSymbolAttribute(MCSymbol *Symbol,
311 MCSymbolAttr Attribute) = 0;
313 /// EmitSymbolDesc - Set the @p DescValue for the @p Symbol.
315 /// @param Symbol - The symbol to have its n_desc field set.
316 /// @param DescValue - The value to set into the n_desc field.
317 virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) = 0;
319 /// BeginCOFFSymbolDef - Start emitting COFF symbol definition
321 /// @param Symbol - The symbol to have its External & Type fields set.
322 virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) = 0;
324 /// EmitCOFFSymbolStorageClass - Emit the storage class of the symbol.
326 /// @param StorageClass - The storage class the symbol should have.
327 virtual void EmitCOFFSymbolStorageClass(int StorageClass) = 0;
329 /// EmitCOFFSymbolType - Emit the type of the symbol.
331 /// @param Type - A COFF type identifier (see COFF::SymbolType in X86COFF.h)
332 virtual void EmitCOFFSymbolType(int Type) = 0;
334 /// EndCOFFSymbolDef - Marks the end of the symbol definition.
335 virtual void EndCOFFSymbolDef() = 0;
337 /// EmitCOFFSecRel32 - Emits a COFF section relative relocation.
339 /// @param Symbol - Symbol the section relative realocation should point to.
340 virtual void EmitCOFFSecRel32(MCSymbol const *Symbol);
342 /// EmitELFSize - Emit an ELF .size directive.
344 /// This corresponds to an assembler statement such as:
345 /// .size symbol, expression
347 virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) = 0;
349 /// EmitCommonSymbol - Emit a common symbol.
351 /// @param Symbol - The common symbol to emit.
352 /// @param Size - The size of the common symbol.
353 /// @param ByteAlignment - The alignment of the symbol if
354 /// non-zero. This must be a power of 2.
355 virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
356 unsigned ByteAlignment) = 0;
358 /// EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
360 /// @param Symbol - The common symbol to emit.
361 /// @param Size - The size of the common symbol.
362 /// @param ByteAlignment - The alignment of the common symbol in bytes.
363 virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
364 unsigned ByteAlignment) = 0;
366 /// EmitZerofill - Emit the zerofill section and an optional symbol.
368 /// @param Section - The zerofill section to create and or to put the symbol
369 /// @param Symbol - The zerofill symbol to emit, if non-NULL.
370 /// @param Size - The size of the zerofill symbol.
371 /// @param ByteAlignment - The alignment of the zerofill symbol if
372 /// non-zero. This must be a power of 2 on some targets.
373 virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
374 unsigned Size = 0,unsigned ByteAlignment = 0) = 0;
376 /// EmitTBSSSymbol - Emit a thread local bss (.tbss) symbol.
378 /// @param Section - The thread local common section.
379 /// @param Symbol - The thread local common symbol to emit.
380 /// @param Size - The size of the symbol.
381 /// @param ByteAlignment - The alignment of the thread local common symbol
382 /// if non-zero. This must be a power of 2 on some targets.
383 virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
384 uint64_t Size, unsigned ByteAlignment = 0) = 0;
387 /// @name Generating Data
390 /// EmitBytes - Emit the bytes in \arg Data into the output.
392 /// This is used to implement assembler directives such as .byte, .ascii,
394 virtual void EmitBytes(StringRef Data, unsigned AddrSpace) = 0;
396 /// EmitValue - Emit the expression @p Value into the output as a native
397 /// integer of the given @p Size bytes.
399 /// This is used to implement assembler directives such as .word, .quad,
402 /// @param Value - The value to emit.
403 /// @param Size - The size of the integer (in bytes) to emit. This must
404 /// match a native machine width.
405 virtual void EmitValueImpl(const MCExpr *Value, unsigned Size,
406 unsigned AddrSpace) = 0;
408 void EmitValue(const MCExpr *Value, unsigned Size, unsigned AddrSpace = 0);
410 /// EmitIntValue - Special case of EmitValue that avoids the client having
411 /// to pass in a MCExpr for constant integers.
412 virtual void EmitIntValue(uint64_t Value, unsigned Size,
413 unsigned AddrSpace = 0);
415 /// EmitAbsValue - Emit the Value, but try to avoid relocations. On MachO
416 /// this is done by producing
419 void EmitAbsValue(const MCExpr *Value, unsigned Size,
420 unsigned AddrSpace = 0);
422 virtual void EmitULEB128Value(const MCExpr *Value) = 0;
424 virtual void EmitSLEB128Value(const MCExpr *Value) = 0;
426 /// EmitULEB128Value - Special case of EmitULEB128Value that avoids the
427 /// client having to pass in a MCExpr for constant integers.
428 void EmitULEB128IntValue(uint64_t Value, unsigned AddrSpace = 0,
429 unsigned Padding = 0);
431 /// EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the
432 /// client having to pass in a MCExpr for constant integers.
433 void EmitSLEB128IntValue(int64_t Value, unsigned AddrSpace = 0);
435 /// EmitSymbolValue - Special case of EmitValue that avoids the client
436 /// having to pass in a MCExpr for MCSymbols.
437 void EmitSymbolValue(const MCSymbol *Sym, unsigned Size,
438 unsigned AddrSpace = 0);
440 /// EmitGPRel32Value - Emit the expression @p Value into the output as a
441 /// gprel32 (32-bit GP relative) value.
443 /// This is used to implement assembler directives such as .gprel32 on
444 /// targets that support them.
445 virtual void EmitGPRel32Value(const MCExpr *Value);
447 /// EmitFill - Emit NumBytes bytes worth of the value specified by
448 /// FillValue. This implements directives such as '.space'.
449 virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue,
452 /// EmitZeros - Emit NumBytes worth of zeros. This is a convenience
453 /// function that just wraps EmitFill.
454 void EmitZeros(uint64_t NumBytes, unsigned AddrSpace) {
455 EmitFill(NumBytes, 0, AddrSpace);
459 /// EmitValueToAlignment - Emit some number of copies of @p Value until
460 /// the byte alignment @p ByteAlignment is reached.
462 /// If the number of bytes need to emit for the alignment is not a multiple
463 /// of @p ValueSize, then the contents of the emitted fill bytes is
466 /// This used to implement the .align assembler directive.
468 /// @param ByteAlignment - The alignment to reach. This must be a power of
469 /// two on some targets.
470 /// @param Value - The value to use when filling bytes.
471 /// @param ValueSize - The size of the integer (in bytes) to emit for
472 /// @p Value. This must match a native machine width.
473 /// @param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
474 /// the alignment cannot be reached in this many bytes, no bytes are
476 virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
477 unsigned ValueSize = 1,
478 unsigned MaxBytesToEmit = 0) = 0;
480 /// EmitCodeAlignment - Emit nops until the byte alignment @p ByteAlignment
483 /// This used to align code where the alignment bytes may be executed. This
484 /// can emit different bytes for different sizes to optimize execution.
486 /// @param ByteAlignment - The alignment to reach. This must be a power of
487 /// two on some targets.
488 /// @param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If
489 /// the alignment cannot be reached in this many bytes, no bytes are
491 virtual void EmitCodeAlignment(unsigned ByteAlignment,
492 unsigned MaxBytesToEmit = 0) = 0;
494 /// EmitValueToOffset - Emit some number of copies of @p Value until the
495 /// byte offset @p Offset is reached.
497 /// This is used to implement assembler directives such as .org.
499 /// @param Offset - The offset to reach. This may be an expression, but the
500 /// expression must be associated with the current section.
501 /// @param Value - The value to use when filling bytes.
502 virtual void EmitValueToOffset(const MCExpr *Offset,
503 unsigned char Value = 0) = 0;
507 /// EmitFileDirective - Switch to a new logical file. This is used to
508 /// implement the '.file "foo.c"' assembler directive.
509 virtual void EmitFileDirective(StringRef Filename) = 0;
511 /// EmitDwarfFileDirective - Associate a filename with a specified logical
512 /// file number. This implements the DWARF2 '.file 4 "foo.c"' assembler
514 virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
517 /// EmitDwarfLocDirective - This implements the DWARF2
518 // '.loc fileno lineno ...' assembler directive.
519 virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
520 unsigned Column, unsigned Flags,
522 unsigned Discriminator,
525 virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
526 const MCSymbol *LastLabel,
527 const MCSymbol *Label,
528 unsigned PointerSize) = 0;
530 virtual void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
531 const MCSymbol *Label) {
534 void EmitDwarfSetLineAddr(int64_t LineDelta, const MCSymbol *Label,
537 virtual void EmitCompactUnwindEncoding(uint32_t CompactUnwindEncoding);
538 virtual void EmitCFISections(bool EH, bool Debug);
539 virtual void EmitCFIStartProc();
540 virtual void EmitCFIEndProc();
541 virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset);
542 virtual void EmitCFIDefCfaOffset(int64_t Offset);
543 virtual void EmitCFIDefCfaRegister(int64_t Register);
544 virtual void EmitCFIOffset(int64_t Register, int64_t Offset);
545 virtual void EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding);
546 virtual void EmitCFILsda(const MCSymbol *Sym, unsigned Encoding);
547 virtual void EmitCFIRememberState();
548 virtual void EmitCFIRestoreState();
549 virtual void EmitCFISameValue(int64_t Register);
550 virtual void EmitCFIRelOffset(int64_t Register, int64_t Offset);
551 virtual void EmitCFIAdjustCfaOffset(int64_t Adjustment);
552 virtual void EmitCFIEscape(StringRef Values);
554 virtual void EmitWin64EHStartProc(const MCSymbol *Symbol);
555 virtual void EmitWin64EHEndProc();
556 virtual void EmitWin64EHStartChained();
557 virtual void EmitWin64EHEndChained();
558 virtual void EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
560 virtual void EmitWin64EHHandlerData();
561 virtual void EmitWin64EHPushReg(unsigned Register);
562 virtual void EmitWin64EHSetFrame(unsigned Register, unsigned Offset);
563 virtual void EmitWin64EHAllocStack(unsigned Size);
564 virtual void EmitWin64EHSaveReg(unsigned Register, unsigned Offset);
565 virtual void EmitWin64EHSaveXMM(unsigned Register, unsigned Offset);
566 virtual void EmitWin64EHPushFrame(bool Code);
567 virtual void EmitWin64EHEndProlog();
569 /// EmitInstruction - Emit the given @p Instruction into the current
571 virtual void EmitInstruction(const MCInst &Inst) = 0;
573 /// EmitRawText - If this file is backed by a assembly streamer, this dumps
574 /// the specified string in the output .s file. This capability is
575 /// indicated by the hasRawTextSupport() predicate. By default this aborts.
576 virtual void EmitRawText(StringRef String);
577 void EmitRawText(const Twine &String);
579 /// ARM-related methods.
580 /// FIXME: Eventually we should have some "target MC streamer" and move
581 /// these methods there.
582 virtual void EmitFnStart();
583 virtual void EmitFnEnd();
584 virtual void EmitCantUnwind();
585 virtual void EmitPersonality(const MCSymbol *Personality);
586 virtual void EmitHandlerData();
587 virtual void EmitSetFP(unsigned FpReg, unsigned SpReg, int64_t Offset = 0);
588 virtual void EmitPad(int64_t Offset);
589 virtual void EmitRegSave(const SmallVectorImpl<unsigned> &RegList,
592 /// Finish - Finish emission of machine code.
593 virtual void Finish() = 0;
596 /// createNullStreamer - Create a dummy machine code streamer, which does
597 /// nothing. This is useful for timing the assembler front end.
598 MCStreamer *createNullStreamer(MCContext &Ctx);
600 /// createAsmStreamer - Create a machine code streamer which will print out
601 /// assembly for the native target, suitable for compiling with a native
604 /// \param InstPrint - If given, the instruction printer to use. If not given
605 /// the MCInst representation will be printed. This method takes ownership of
608 /// \param CE - If given, a code emitter to use to show the instruction
609 /// encoding inline with the assembly. This method takes ownership of \arg CE.
611 /// \param TAB - If given, a target asm backend to use to show the fixup
612 /// information in conjunction with encoding information. This method takes
613 /// ownership of \arg TAB.
615 /// \param ShowInst - Whether to show the MCInst representation inline with
618 /// \param DecodeLSDA - If true, emit comments that translates the LSDA into a
619 /// human readable format. Only usable with CFI.
620 MCStreamer *createAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS,
624 bool useDwarfDirectory,
625 MCInstPrinter *InstPrint = 0,
626 MCCodeEmitter *CE = 0,
627 MCAsmBackend *TAB = 0,
628 bool ShowInst = false);
630 /// createMachOStreamer - Create a machine code streamer which will generate
631 /// Mach-O format object files.
633 /// Takes ownership of \arg TAB and \arg CE.
634 MCStreamer *createMachOStreamer(MCContext &Ctx, MCAsmBackend &TAB,
635 raw_ostream &OS, MCCodeEmitter *CE,
636 bool RelaxAll = false);
638 /// createWinCOFFStreamer - Create a machine code streamer which will
639 /// generate Microsoft COFF format object files.
641 /// Takes ownership of \arg TAB and \arg CE.
642 MCStreamer *createWinCOFFStreamer(MCContext &Ctx,
644 MCCodeEmitter &CE, raw_ostream &OS,
645 bool RelaxAll = false);
647 /// createELFStreamer - Create a machine code streamer which will generate
648 /// ELF format object files.
649 MCStreamer *createELFStreamer(MCContext &Ctx, MCAsmBackend &TAB,
650 raw_ostream &OS, MCCodeEmitter *CE,
651 bool RelaxAll, bool NoExecStack);
653 /// createLoggingStreamer - Create a machine code streamer which just logs the
654 /// API calls and then dispatches to another streamer.
656 /// The new streamer takes ownership of the \arg Child.
657 MCStreamer *createLoggingStreamer(MCStreamer *Child, raw_ostream &OS);
659 /// createPureStreamer - Create a machine code streamer which will generate
660 /// "pure" MC object files, for use with MC-JIT and testing tools.
662 /// Takes ownership of \arg TAB and \arg CE.
663 MCStreamer *createPureStreamer(MCContext &Ctx, MCAsmBackend &TAB,
664 raw_ostream &OS, MCCodeEmitter *CE);
666 } // end namespace llvm