AArch64TargetStreamer.h revision 287506
1167802Sjkim//===-- AArch64TargetStreamer.h - AArch64 Target Streamer ------*- C++ -*--===//
2167802Sjkim//
3167802Sjkim//                     The LLVM Compiler Infrastructure
4167802Sjkim//
5167802Sjkim// This file is distributed under the University of Illinois Open Source
6167802Sjkim// License. See LICENSE.TXT for details.
7217365Sjkim//
8245582Sjkim//===----------------------------------------------------------------------===//
9167802Sjkim
10167802Sjkim#ifndef LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64TARGETSTREAMER_H
11217365Sjkim#define LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64TARGETSTREAMER_H
12217365Sjkim
13217365Sjkim#include "llvm/MC/MCStreamer.h"
14217365Sjkim
15217365Sjkimnamespace llvm {
16217365Sjkim
17217365Sjkimclass AArch64TargetStreamer : public MCTargetStreamer {
18217365Sjkimpublic:
19217365Sjkim  AArch64TargetStreamer(MCStreamer &S);
20217365Sjkim  ~AArch64TargetStreamer() override;
21217365Sjkim
22217365Sjkim  void finish() override;
23217365Sjkim
24217365Sjkim  /// Callback used to implement the ldr= pseudo.
25167802Sjkim  /// Add a new entry to the constant pool for the current section and return an
26217365Sjkim  /// MCExpr that can be used to refer to the constant pool location.
27217365Sjkim  const MCExpr *addConstantPoolEntry(const MCExpr *, unsigned Size);
28217365Sjkim
29167802Sjkim  /// Callback used to implemnt the .ltorg directive.
30217365Sjkim  /// Emit contents of constant pool for the current section.
31217365Sjkim  void emitCurrentConstantPool();
32217365Sjkim
33217365Sjkim  /// Callback used to implement the .inst directive.
34217365Sjkim  virtual void emitInst(uint32_t Inst);
35217365Sjkim
36217365Sjkimprivate:
37217365Sjkim  std::unique_ptr<AssemblerConstantPools> ConstantPools;
38217365Sjkim};
39217365Sjkim
40217365Sjkim} // end namespace llvm
41217365Sjkim
42217365Sjkim#endif
43167802Sjkim