1 //===- lib/MC/MCXCOFFStreamer.cpp - XCOFF Object Output -------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file assembles .s files and emits XCOFF .o object files.
11 //===----------------------------------------------------------------------===//
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"
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
)) {}
28 bool MCXCOFFStreamer::EmitSymbolAttribute(MCSymbol
*Symbol
,
29 MCSymbolAttr Attribute
) {
30 report_fatal_error("Symbol attributes not implemented for XCOFF.");
33 void MCXCOFFStreamer::EmitCommonSymbol(MCSymbol
*Symbol
, uint64_t Size
,
34 unsigned ByteAlignment
) {
35 report_fatal_error("Emiting common symbols not implemented for XCOFF.");
38 void MCXCOFFStreamer::EmitZerofill(MCSection
*Section
, MCSymbol
*Symbol
,
39 uint64_t Size
, unsigned ByteAlignment
,
41 report_fatal_error("Zero fill not implemented for XCOFF.");
44 void MCXCOFFStreamer::EmitInstToData(const MCInst
&Inst
,
45 const MCSubtargetInfo
&) {
46 report_fatal_error("Instruction emission not implemented for XCOFF.");
49 MCStreamer
*llvm::createXCOFFStreamer(MCContext
&Context
,
50 std::unique_ptr
<MCAsmBackend
> &&MAB
,
51 std::unique_ptr
<MCObjectWriter
> &&OW
,
52 std::unique_ptr
<MCCodeEmitter
> &&CE
,
54 MCXCOFFStreamer
*S
= new MCXCOFFStreamer(Context
, std::move(MAB
),
55 std::move(OW
), std::move(CE
));
57 S
->getAssembler().setRelaxAll(true);