Path: blob/main/contrib/llvm-project/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaTargetStreamer.h
35295 views
//===-- XtensaTargetStreamer.h - Xtensa Target Streamer --------*- C++ -*--===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_XTENSA_XTENSATARGETSTREAMER_H9#define LLVM_LIB_TARGET_XTENSA_XTENSATARGETSTREAMER_H1011#include "llvm/MC/MCELFStreamer.h"12#include "llvm/MC/MCStreamer.h"13#include "llvm/Support/SMLoc.h"1415namespace llvm {16class formatted_raw_ostream;1718class XtensaTargetStreamer : public MCTargetStreamer {19public:20XtensaTargetStreamer(MCStreamer &S);2122// Emit literal label and literal Value to the literal section. If literal23// section is not switched yet (SwitchLiteralSection is true) then switch to24// literal section.25virtual void emitLiteral(MCSymbol *LblSym, const MCExpr *Value,26bool SwitchLiteralSection, SMLoc L = SMLoc()) = 0;2728virtual void emitLiteralPosition() = 0;2930// Switch to the literal section. The BaseSection name is used to construct31// literal section name.32virtual void startLiteralSection(MCSection *BaseSection) = 0;33};3435class XtensaTargetAsmStreamer : public XtensaTargetStreamer {36formatted_raw_ostream &OS;3738public:39XtensaTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);40void emitLiteral(MCSymbol *LblSym, const MCExpr *Value,41bool SwitchLiteralSection, SMLoc L) override;42void emitLiteralPosition() override;43void startLiteralSection(MCSection *Section) override;44};4546class XtensaTargetELFStreamer : public XtensaTargetStreamer {47public:48XtensaTargetELFStreamer(MCStreamer &S);49MCELFStreamer &getStreamer();50void emitLiteral(MCSymbol *LblSym, const MCExpr *Value,51bool SwitchLiteralSection, SMLoc L) override;52void emitLiteralPosition() override {}53void startLiteralSection(MCSection *Section) override;54};55} // end namespace llvm5657#endif // LLVM_LIB_TARGET_XTENSA_XTENSATARGETSTREAMER_H585960