brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 96c324a Raw
47 lines · c
1//===-- LoongArchTargetStreamer.h - LoongArch Target Streamer --*- C++ -*--===//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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHTARGETSTREAMER_H10#define LLVM_LIB_TARGET_LOONGARCH_MCTARGETDESC_LOONGARCHTARGETSTREAMER_H11 12#include "LoongArch.h"13#include "llvm/MC/MCStreamer.h"14#include "llvm/MC/MCSubtargetInfo.h"15#include "llvm/Support/FormattedStream.h"16 17namespace llvm {18class LoongArchTargetStreamer : public MCTargetStreamer {19  LoongArchABI::ABI TargetABI = LoongArchABI::ABI_Unknown;20 21public:22  LoongArchTargetStreamer(MCStreamer &S);23  void setTargetABI(LoongArchABI::ABI ABI);24  LoongArchABI::ABI getTargetABI() const { return TargetABI; }25 26  virtual void emitDirectiveOptionPush();27  virtual void emitDirectiveOptionPop();28  virtual void emitDirectiveOptionRelax();29  virtual void emitDirectiveOptionNoRelax();30};31 32// This part is for ascii assembly output.33class LoongArchTargetAsmStreamer : public LoongArchTargetStreamer {34  formatted_raw_ostream &OS;35 36public:37  LoongArchTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS);38 39  void emitDirectiveOptionPush() override;40  void emitDirectiveOptionPop() override;41  void emitDirectiveOptionRelax() override;42  void emitDirectiveOptionNoRelax() override;43};44 45} // end namespace llvm46#endif47