1 //===- lib/MC/MCStreamer.cpp - Streaming Machine Code Output --------------===//
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 #include "llvm/MC/MCStreamer.h"
11 #include "llvm/ADT/SmallString.h"
12 #include "llvm/ADT/Twine.h"
13 #include "llvm/MC/MCAsmBackend.h"
14 #include "llvm/MC/MCAsmInfo.h"
15 #include "llvm/MC/MCContext.h"
16 #include "llvm/MC/MCExpr.h"
17 #include "llvm/MC/MCObjectWriter.h"
18 #include "llvm/MC/MCSymbol.h"
19 #include "llvm/Support/ErrorHandling.h"
20 #include "llvm/Support/LEB128.h"
21 #include "llvm/Support/raw_ostream.h"
25 // Pin the vtables to this file.
26 MCTargetStreamer::~MCTargetStreamer() {}
27 void ARMTargetStreamer::anchor() {}
29 MCStreamer::MCStreamer(MCContext &Ctx, MCTargetStreamer *TargetStreamer)
30 : Context(Ctx), TargetStreamer(TargetStreamer), EmitEHFrame(true),
31 EmitDebugFrame(false), CurrentW64UnwindInfo(0), LastSymbol(0),
32 AutoInitSections(false) {
33 SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
35 TargetStreamer->setStreamer(this);
38 MCStreamer::~MCStreamer() {
39 for (unsigned i = 0; i < getNumW64UnwindInfos(); ++i)
40 delete W64UnwindInfos[i];
43 void MCStreamer::reset() {
44 for (unsigned i = 0; i < getNumW64UnwindInfos(); ++i)
45 delete W64UnwindInfos[i];
46 W64UnwindInfos.clear();
48 EmitDebugFrame = false;
49 CurrentW64UnwindInfo = 0;
52 SectionStack.push_back(std::pair<MCSectionSubPair, MCSectionSubPair>());
55 const MCExpr *MCStreamer::BuildSymbolDiff(MCContext &Context,
58 MCSymbolRefExpr::VariantKind Variant = MCSymbolRefExpr::VK_None;
60 MCSymbolRefExpr::Create(A, Variant, Context);
62 MCSymbolRefExpr::Create(B, Variant, Context);
63 const MCExpr *AddrDelta =
64 MCBinaryExpr::Create(MCBinaryExpr::Sub, ARef, BRef, Context);
68 const MCExpr *MCStreamer::ForceExpAbs(const MCExpr* Expr) {
69 if (Context.getAsmInfo()->hasAggressiveSymbolFolding() ||
70 isa<MCSymbolRefExpr>(Expr))
73 MCSymbol *ABS = Context.CreateTempSymbol();
74 EmitAssignment(ABS, Expr);
75 return MCSymbolRefExpr::Create(ABS, Context);
78 raw_ostream &MCStreamer::GetCommentOS() {
79 // By default, discard comments.
83 void MCStreamer::generateCompactUnwindEncodings(MCAsmBackend *MAB) {
84 for (std::vector<MCDwarfFrameInfo>::iterator I = FrameInfos.begin(),
85 E = FrameInfos.end(); I != E; ++I)
86 I->CompactUnwindEncoding =
87 (MAB ? MAB->generateCompactUnwindEncoding(I->Instructions) : 0);
90 void MCStreamer::EmitDwarfSetLineAddr(int64_t LineDelta,
91 const MCSymbol *Label, int PointerSize) {
92 // emit the sequence to set the address
93 EmitIntValue(dwarf::DW_LNS_extended_op, 1);
94 EmitULEB128IntValue(PointerSize + 1);
95 EmitIntValue(dwarf::DW_LNE_set_address, 1);
96 EmitSymbolValue(Label, PointerSize);
98 // emit the sequence for the LineDelta (from 1) and a zero address delta.
99 MCDwarfLineAddr::Emit(this, LineDelta, 0);
102 /// EmitIntValue - Special case of EmitValue that avoids the client having to
103 /// pass in a MCExpr for constant integers.
104 void MCStreamer::EmitIntValue(uint64_t Value, unsigned Size) {
105 assert(Size <= 8 && "Invalid size");
106 assert((isUIntN(8 * Size, Value) || isIntN(8 * Size, Value)) &&
109 const bool isLittleEndian = Context.getAsmInfo()->isLittleEndian();
110 for (unsigned i = 0; i != Size; ++i) {
111 unsigned index = isLittleEndian ? i : (Size - i - 1);
112 buf[i] = uint8_t(Value >> (index * 8));
114 EmitBytes(StringRef(buf, Size));
117 /// EmitULEB128Value - Special case of EmitULEB128Value that avoids the
118 /// client having to pass in a MCExpr for constant integers.
119 void MCStreamer::EmitULEB128IntValue(uint64_t Value, unsigned Padding) {
120 SmallString<128> Tmp;
121 raw_svector_ostream OSE(Tmp);
122 encodeULEB128(Value, OSE, Padding);
123 EmitBytes(OSE.str());
126 /// EmitSLEB128Value - Special case of EmitSLEB128Value that avoids the
127 /// client having to pass in a MCExpr for constant integers.
128 void MCStreamer::EmitSLEB128IntValue(int64_t Value) {
129 SmallString<128> Tmp;
130 raw_svector_ostream OSE(Tmp);
131 encodeSLEB128(Value, OSE);
132 EmitBytes(OSE.str());
135 void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) {
136 const MCExpr *ABS = ForceExpAbs(Value);
137 EmitValue(ABS, Size);
141 void MCStreamer::EmitValue(const MCExpr *Value, unsigned Size) {
142 EmitValueImpl(Value, Size);
145 void MCStreamer::EmitSymbolValue(const MCSymbol *Sym, unsigned Size) {
146 EmitValueImpl(MCSymbolRefExpr::Create(Sym, getContext()), Size);
149 void MCStreamer::EmitGPRel64Value(const MCExpr *Value) {
150 report_fatal_error("unsupported directive in streamer");
153 void MCStreamer::EmitGPRel32Value(const MCExpr *Value) {
154 report_fatal_error("unsupported directive in streamer");
157 /// EmitFill - Emit NumBytes bytes worth of the value specified by
158 /// FillValue. This implements directives such as '.space'.
159 void MCStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
160 const MCExpr *E = MCConstantExpr::Create(FillValue, getContext());
161 for (uint64_t i = 0, e = NumBytes; i != e; ++i)
165 /// The implementation in this class just redirects to EmitFill.
166 void MCStreamer::EmitZeros(uint64_t NumBytes) {
167 EmitFill(NumBytes, 0);
170 bool MCStreamer::EmitDwarfFileDirective(unsigned FileNo,
172 StringRef Filename, unsigned CUID) {
173 return getContext().GetDwarfFile(Directory, Filename, FileNo, CUID) == 0;
176 void MCStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
177 unsigned Column, unsigned Flags,
179 unsigned Discriminator,
180 StringRef FileName) {
181 getContext().setCurrentDwarfLoc(FileNo, Line, Column, Flags, Isa,
185 MCDwarfFrameInfo *MCStreamer::getCurrentFrameInfo() {
186 if (FrameInfos.empty())
188 return &FrameInfos.back();
191 void MCStreamer::EnsureValidFrame() {
192 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
193 if (!CurFrame || CurFrame->End)
194 report_fatal_error("No open frame");
197 void MCStreamer::EmitEHSymAttributes(const MCSymbol *Symbol,
198 MCSymbol *EHSymbol) {
201 void MCStreamer::AssignSection(MCSymbol *Symbol, const MCSection *Section) {
203 Symbol->setSection(*Section);
205 Symbol->setUndefined();
207 // As we emit symbols into a section, track the order so that they can
208 // be sorted upon later. Zero is reserved to mean 'unemitted'.
209 SymbolOrdering[Symbol] = 1 + SymbolOrdering.size();
212 void MCStreamer::EmitLabel(MCSymbol *Symbol) {
213 assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
214 assert(getCurrentSection().first && "Cannot emit before setting section!");
215 AssignSection(Symbol, getCurrentSection().first);
219 void MCStreamer::EmitDebugLabel(MCSymbol *Symbol) {
220 assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
221 assert(getCurrentSection().first && "Cannot emit before setting section!");
222 AssignSection(Symbol, getCurrentSection().first);
226 void MCStreamer::EmitCompactUnwindEncoding(uint32_t CompactUnwindEncoding) {
228 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
229 CurFrame->CompactUnwindEncoding = CompactUnwindEncoding;
232 void MCStreamer::EmitCFISections(bool EH, bool Debug) {
235 EmitDebugFrame = Debug;
238 void MCStreamer::EmitCFIStartProc() {
239 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
240 if (CurFrame && !CurFrame->End)
241 report_fatal_error("Starting a frame before finishing the previous one!");
243 MCDwarfFrameInfo Frame;
244 EmitCFIStartProcImpl(Frame);
246 FrameInfos.push_back(Frame);
249 void MCStreamer::EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) {
252 void MCStreamer::RecordProcStart(MCDwarfFrameInfo &Frame) {
253 Frame.Function = LastSymbol;
254 // If the function is externally visible, we need to create a local
255 // symbol to avoid relocations.
256 StringRef Prefix = getContext().getAsmInfo()->getPrivateGlobalPrefix();
257 if (LastSymbol && LastSymbol->getName().startswith(Prefix)) {
258 Frame.Begin = LastSymbol;
260 Frame.Begin = getContext().CreateTempSymbol();
261 EmitLabel(Frame.Begin);
265 void MCStreamer::EmitCFIEndProc() {
267 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
268 EmitCFIEndProcImpl(*CurFrame);
271 void MCStreamer::EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
274 void MCStreamer::RecordProcEnd(MCDwarfFrameInfo &Frame) {
275 Frame.End = getContext().CreateTempSymbol();
276 EmitLabel(Frame.End);
279 MCSymbol *MCStreamer::EmitCFICommon() {
281 MCSymbol *Label = getContext().CreateTempSymbol();
286 void MCStreamer::EmitCFIDefCfa(int64_t Register, int64_t Offset) {
287 MCSymbol *Label = EmitCFICommon();
288 MCCFIInstruction Instruction =
289 MCCFIInstruction::createDefCfa(Label, Register, Offset);
290 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
291 CurFrame->Instructions.push_back(Instruction);
294 void MCStreamer::EmitCFIDefCfaOffset(int64_t Offset) {
295 MCSymbol *Label = EmitCFICommon();
296 MCCFIInstruction Instruction =
297 MCCFIInstruction::createDefCfaOffset(Label, Offset);
298 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
299 CurFrame->Instructions.push_back(Instruction);
302 void MCStreamer::EmitCFIAdjustCfaOffset(int64_t Adjustment) {
303 MCSymbol *Label = EmitCFICommon();
304 MCCFIInstruction Instruction =
305 MCCFIInstruction::createAdjustCfaOffset(Label, Adjustment);
306 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
307 CurFrame->Instructions.push_back(Instruction);
310 void MCStreamer::EmitCFIDefCfaRegister(int64_t Register) {
311 MCSymbol *Label = EmitCFICommon();
312 MCCFIInstruction Instruction =
313 MCCFIInstruction::createDefCfaRegister(Label, Register);
314 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
315 CurFrame->Instructions.push_back(Instruction);
318 void MCStreamer::EmitCFIOffset(int64_t Register, int64_t Offset) {
319 MCSymbol *Label = EmitCFICommon();
320 MCCFIInstruction Instruction =
321 MCCFIInstruction::createOffset(Label, Register, Offset);
322 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
323 CurFrame->Instructions.push_back(Instruction);
326 void MCStreamer::EmitCFIRelOffset(int64_t Register, int64_t Offset) {
327 MCSymbol *Label = EmitCFICommon();
328 MCCFIInstruction Instruction =
329 MCCFIInstruction::createRelOffset(Label, Register, Offset);
330 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
331 CurFrame->Instructions.push_back(Instruction);
334 void MCStreamer::EmitCFIPersonality(const MCSymbol *Sym,
337 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
338 CurFrame->Personality = Sym;
339 CurFrame->PersonalityEncoding = Encoding;
342 void MCStreamer::EmitCFILsda(const MCSymbol *Sym, unsigned Encoding) {
344 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
345 CurFrame->Lsda = Sym;
346 CurFrame->LsdaEncoding = Encoding;
349 void MCStreamer::EmitCFIRememberState() {
350 MCSymbol *Label = EmitCFICommon();
351 MCCFIInstruction Instruction = MCCFIInstruction::createRememberState(Label);
352 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
353 CurFrame->Instructions.push_back(Instruction);
356 void MCStreamer::EmitCFIRestoreState() {
357 // FIXME: Error if there is no matching cfi_remember_state.
358 MCSymbol *Label = EmitCFICommon();
359 MCCFIInstruction Instruction = MCCFIInstruction::createRestoreState(Label);
360 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
361 CurFrame->Instructions.push_back(Instruction);
364 void MCStreamer::EmitCFISameValue(int64_t Register) {
365 MCSymbol *Label = EmitCFICommon();
366 MCCFIInstruction Instruction =
367 MCCFIInstruction::createSameValue(Label, Register);
368 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
369 CurFrame->Instructions.push_back(Instruction);
372 void MCStreamer::EmitCFIRestore(int64_t Register) {
373 MCSymbol *Label = EmitCFICommon();
374 MCCFIInstruction Instruction =
375 MCCFIInstruction::createRestore(Label, Register);
376 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
377 CurFrame->Instructions.push_back(Instruction);
380 void MCStreamer::EmitCFIEscape(StringRef Values) {
381 MCSymbol *Label = EmitCFICommon();
382 MCCFIInstruction Instruction = MCCFIInstruction::createEscape(Label, Values);
383 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
384 CurFrame->Instructions.push_back(Instruction);
387 void MCStreamer::EmitCFISignalFrame() {
389 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
390 CurFrame->IsSignalFrame = true;
393 void MCStreamer::EmitCFIUndefined(int64_t Register) {
394 MCSymbol *Label = EmitCFICommon();
395 MCCFIInstruction Instruction =
396 MCCFIInstruction::createUndefined(Label, Register);
397 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
398 CurFrame->Instructions.push_back(Instruction);
401 void MCStreamer::EmitCFIRegister(int64_t Register1, int64_t Register2) {
402 MCSymbol *Label = EmitCFICommon();
403 MCCFIInstruction Instruction =
404 MCCFIInstruction::createRegister(Label, Register1, Register2);
405 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
406 CurFrame->Instructions.push_back(Instruction);
409 void MCStreamer::EmitCFIWindowSave() {
410 MCSymbol *Label = EmitCFICommon();
411 MCCFIInstruction Instruction =
412 MCCFIInstruction::createWindowSave(Label);
413 MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo();
414 CurFrame->Instructions.push_back(Instruction);
417 void MCStreamer::setCurrentW64UnwindInfo(MCWin64EHUnwindInfo *Frame) {
418 W64UnwindInfos.push_back(Frame);
419 CurrentW64UnwindInfo = W64UnwindInfos.back();
422 void MCStreamer::EnsureValidW64UnwindInfo() {
423 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
424 if (!CurFrame || CurFrame->End)
425 report_fatal_error("No open Win64 EH frame function!");
428 void MCStreamer::EmitWin64EHStartProc(const MCSymbol *Symbol) {
429 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
430 if (CurFrame && !CurFrame->End)
431 report_fatal_error("Starting a function before ending the previous one!");
432 MCWin64EHUnwindInfo *Frame = new MCWin64EHUnwindInfo;
433 Frame->Begin = getContext().CreateTempSymbol();
434 Frame->Function = Symbol;
435 EmitLabel(Frame->Begin);
436 setCurrentW64UnwindInfo(Frame);
439 void MCStreamer::EmitWin64EHEndProc() {
440 EnsureValidW64UnwindInfo();
441 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
442 if (CurFrame->ChainedParent)
443 report_fatal_error("Not all chained regions terminated!");
444 CurFrame->End = getContext().CreateTempSymbol();
445 EmitLabel(CurFrame->End);
448 void MCStreamer::EmitWin64EHStartChained() {
449 EnsureValidW64UnwindInfo();
450 MCWin64EHUnwindInfo *Frame = new MCWin64EHUnwindInfo;
451 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
452 Frame->Begin = getContext().CreateTempSymbol();
453 Frame->Function = CurFrame->Function;
454 Frame->ChainedParent = CurFrame;
455 EmitLabel(Frame->Begin);
456 setCurrentW64UnwindInfo(Frame);
459 void MCStreamer::EmitWin64EHEndChained() {
460 EnsureValidW64UnwindInfo();
461 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
462 if (!CurFrame->ChainedParent)
463 report_fatal_error("End of a chained region outside a chained region!");
464 CurFrame->End = getContext().CreateTempSymbol();
465 EmitLabel(CurFrame->End);
466 CurrentW64UnwindInfo = CurFrame->ChainedParent;
469 void MCStreamer::EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
471 EnsureValidW64UnwindInfo();
472 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
473 if (CurFrame->ChainedParent)
474 report_fatal_error("Chained unwind areas can't have handlers!");
475 CurFrame->ExceptionHandler = Sym;
476 if (!Except && !Unwind)
477 report_fatal_error("Don't know what kind of handler this is!");
479 CurFrame->HandlesUnwind = true;
481 CurFrame->HandlesExceptions = true;
484 void MCStreamer::EmitWin64EHHandlerData() {
485 EnsureValidW64UnwindInfo();
486 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
487 if (CurFrame->ChainedParent)
488 report_fatal_error("Chained unwind areas can't have handlers!");
491 void MCStreamer::EmitWin64EHPushReg(unsigned Register) {
492 EnsureValidW64UnwindInfo();
493 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
494 MCSymbol *Label = getContext().CreateTempSymbol();
495 MCWin64EHInstruction Inst(Win64EH::UOP_PushNonVol, Label, Register);
497 CurFrame->Instructions.push_back(Inst);
500 void MCStreamer::EmitWin64EHSetFrame(unsigned Register, unsigned Offset) {
501 EnsureValidW64UnwindInfo();
502 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
503 if (CurFrame->LastFrameInst >= 0)
504 report_fatal_error("Frame register and offset already specified!");
506 report_fatal_error("Misaligned frame pointer offset!");
507 MCSymbol *Label = getContext().CreateTempSymbol();
508 MCWin64EHInstruction Inst(Win64EH::UOP_SetFPReg, Label, Register, Offset);
510 CurFrame->LastFrameInst = CurFrame->Instructions.size();
511 CurFrame->Instructions.push_back(Inst);
514 void MCStreamer::EmitWin64EHAllocStack(unsigned Size) {
515 EnsureValidW64UnwindInfo();
517 report_fatal_error("Misaligned stack allocation!");
518 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
519 MCSymbol *Label = getContext().CreateTempSymbol();
520 MCWin64EHInstruction Inst(Label, Size);
522 CurFrame->Instructions.push_back(Inst);
525 void MCStreamer::EmitWin64EHSaveReg(unsigned Register, unsigned Offset) {
526 EnsureValidW64UnwindInfo();
528 report_fatal_error("Misaligned saved register offset!");
529 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
530 MCSymbol *Label = getContext().CreateTempSymbol();
531 MCWin64EHInstruction Inst(
532 Offset > 512*1024-8 ? Win64EH::UOP_SaveNonVolBig : Win64EH::UOP_SaveNonVol,
533 Label, Register, Offset);
535 CurFrame->Instructions.push_back(Inst);
538 void MCStreamer::EmitWin64EHSaveXMM(unsigned Register, unsigned Offset) {
539 EnsureValidW64UnwindInfo();
541 report_fatal_error("Misaligned saved vector register offset!");
542 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
543 MCSymbol *Label = getContext().CreateTempSymbol();
544 MCWin64EHInstruction Inst(
545 Offset > 512*1024-16 ? Win64EH::UOP_SaveXMM128Big : Win64EH::UOP_SaveXMM128,
546 Label, Register, Offset);
548 CurFrame->Instructions.push_back(Inst);
551 void MCStreamer::EmitWin64EHPushFrame(bool Code) {
552 EnsureValidW64UnwindInfo();
553 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
554 if (CurFrame->Instructions.size() > 0)
555 report_fatal_error("If present, PushMachFrame must be the first UOP");
556 MCSymbol *Label = getContext().CreateTempSymbol();
557 MCWin64EHInstruction Inst(Win64EH::UOP_PushMachFrame, Label, Code);
559 CurFrame->Instructions.push_back(Inst);
562 void MCStreamer::EmitWin64EHEndProlog() {
563 EnsureValidW64UnwindInfo();
564 MCWin64EHUnwindInfo *CurFrame = CurrentW64UnwindInfo;
565 CurFrame->PrologEnd = getContext().CreateTempSymbol();
566 EmitLabel(CurFrame->PrologEnd);
569 void MCStreamer::EmitCOFFSecRel32(MCSymbol const *Symbol) {
570 llvm_unreachable("This file format doesn't support this directive");
573 /// EmitRawText - If this file is backed by an assembly streamer, this dumps
574 /// the specified string in the output .s file. This capability is
575 /// indicated by the hasRawTextSupport() predicate.
576 void MCStreamer::EmitRawTextImpl(StringRef String) {
577 errs() << "EmitRawText called on an MCStreamer that doesn't support it, "
578 " something must not be fully mc'ized\n";
582 void MCStreamer::EmitRawText(const Twine &T) {
583 SmallString<128> Str;
584 EmitRawTextImpl(T.toStringRef(Str));
587 void MCStreamer::EmitFrames(MCAsmBackend *MAB, bool usingCFI) {
588 if (!getNumFrameInfos())
592 MCDwarfFrameEmitter::Emit(*this, MAB, usingCFI, true);
595 MCDwarfFrameEmitter::Emit(*this, MAB, usingCFI, false);
598 void MCStreamer::EmitW64Tables() {
599 if (!getNumW64UnwindInfos())
602 MCWin64EHUnwindEmitter::Emit(*this);
605 void MCStreamer::Finish() {
606 if (!FrameInfos.empty() && !FrameInfos.back().End)
607 report_fatal_error("Unfinished frame!");
612 MCSymbolData &MCStreamer::getOrCreateSymbolData(MCSymbol *Symbol) {
613 report_fatal_error("Not supported!");
614 return *(static_cast<MCSymbolData*>(0));