| Sean Fertile | f09d54e | 2019-07-09 19:21:01 +0000 | [diff] [blame] | 1 | //===- lib/MC/MCXCOFFStreamer.cpp - XCOFF Object Output -------------------===// |
| 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 assembles .s files and emits XCOFF .o object files. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #include "llvm/MC/MCXCOFFStreamer.h" |
| 14 | #include "llvm/MC/MCAsmBackend.h" |
| 15 | #include "llvm/MC/MCCodeEmitter.h" |
| 16 | #include "llvm/MC/MCObjectWriter.h" |
| 17 | #include "llvm/Support/TargetRegistry.h" |
| 18 | |
| 19 | using namespace llvm; |
| 20 | |
| 21 | MCXCOFFStreamer::MCXCOFFStreamer(MCContext &Context, |
| 22 | std::unique_ptr<MCAsmBackend> MAB, |
| 23 | std::unique_ptr<MCObjectWriter> OW, |
| 24 | std::unique_ptr<MCCodeEmitter> Emitter) |
| 25 | : MCObjectStreamer(Context, std::move(MAB), std::move(OW), |
| 26 | std::move(Emitter)) {} |
| 27 | |
| 28 | bool MCXCOFFStreamer::EmitSymbolAttribute(MCSymbol *Symbol, |
| 29 | MCSymbolAttr Attribute) { |
| 30 | report_fatal_error("Symbol attributes not implemented for XCOFF."); |
| 31 | } |
| 32 | |
| 33 | void MCXCOFFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, |
| 34 | unsigned ByteAlignment) { |
| 35 | report_fatal_error("Emiting common symbols not implemented for XCOFF."); |
| 36 | } |
| 37 | |
| 38 | void MCXCOFFStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol, |
| 39 | uint64_t Size, unsigned ByteAlignment, |
| 40 | SMLoc Loc) { |
| 41 | report_fatal_error("Zero fill not implemented for XCOFF."); |
| 42 | } |
| 43 | |
| 44 | void MCXCOFFStreamer::EmitInstToData(const MCInst &Inst, |
| 45 | const MCSubtargetInfo &) { |
| 46 | report_fatal_error("Instruction emission not implemented for XCOFF."); |
| 47 | } |
| 48 | |
| 49 | MCStreamer *llvm::createXCOFFStreamer(MCContext &Context, |
| 50 | std::unique_ptr<MCAsmBackend> &&MAB, |
| 51 | std::unique_ptr<MCObjectWriter> &&OW, |
| 52 | std::unique_ptr<MCCodeEmitter> &&CE, |
| 53 | bool RelaxAll) { |
| 54 | MCXCOFFStreamer *S = new MCXCOFFStreamer(Context, std::move(MAB), |
| 55 | std::move(OW), std::move(CE)); |
| 56 | if (RelaxAll) |
| 57 | S->getAssembler().setRelaxAll(true); |
| 58 | return S; |
| 59 | } |
| David Tenty | 8558aac | 2019-08-08 15:40:35 +0000 | [diff] [blame^] | 60 | |
| 61 | void MCXCOFFStreamer::EmitXCOFFLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, |
| 62 | unsigned ByteAlign) { |
| 63 | llvm_unreachable("Not implemented yet."); |
| 64 | } |