LLVM API Documentation

AArch64TargetStreamer.cpp
Go to the documentation of this file.
00001 //===- AArch64TargetStreamer.cpp - AArch64TargetStreamer class --*- C++ -*---------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file implements the AArch64TargetStreamer class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 #include "llvm/ADT/MapVector.h"
00014 #include "llvm/MC/ConstantPools.h"
00015 #include "llvm/MC/MCContext.h"
00016 #include "llvm/MC/MCExpr.h"
00017 #include "llvm/MC/MCStreamer.h"
00018 
00019 using namespace llvm;
00020 
00021 //
00022 // AArch64TargetStreamer Implemenation
00023 //
00024 AArch64TargetStreamer::AArch64TargetStreamer(MCStreamer &S)
00025     : MCTargetStreamer(S), ConstantPools(new AssemblerConstantPools()) {}
00026 
00027 AArch64TargetStreamer::~AArch64TargetStreamer() {}
00028 
00029 // The constant pool handling is shared by all AArch64TargetStreamer
00030 // implementations.
00031 const MCExpr *AArch64TargetStreamer::addConstantPoolEntry(const MCExpr *Expr,
00032                                                           unsigned Size) {
00033   return ConstantPools->addEntry(Streamer, Expr, Size);
00034 }
00035 
00036 void AArch64TargetStreamer::emitCurrentConstantPool() {
00037   ConstantPools->emitForCurrentSection(Streamer);
00038 }
00039 
00040 // finish() - write out any non-empty assembler constant pools.
00041 void AArch64TargetStreamer::finish() { ConstantPools->emitAll(Streamer); }