1 //===-- RecordStreamer.cpp - Record asm definde and used symbols ----------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "RecordStreamer.h"
11 #include "llvm/MC/MCSymbol.h"
14 void RecordStreamer::markDefined(const MCSymbol &Symbol) {
15 State &S = Symbols[Symbol.getName()];
29 void RecordStreamer::markGlobal(const MCSymbol &Symbol) {
30 State &S = Symbols[Symbol.getName()];
45 void RecordStreamer::markUsed(const MCSymbol &Symbol) {
46 State &S = Symbols[Symbol.getName()];
60 void RecordStreamer::visitUsedSymbol(const MCSymbol &Sym) { markUsed(Sym); }
62 RecordStreamer::const_iterator RecordStreamer::begin() {
63 return Symbols.begin();
66 RecordStreamer::const_iterator RecordStreamer::end() { return Symbols.end(); }
68 RecordStreamer::RecordStreamer(MCContext &Context) : MCStreamer(Context) {}
70 void RecordStreamer::EmitInstruction(const MCInst &Inst,
71 const MCSubtargetInfo &STI) {
72 MCStreamer::EmitInstruction(Inst, STI);
75 void RecordStreamer::EmitLabel(MCSymbol *Symbol) {
76 MCStreamer::EmitLabel(Symbol);
80 void RecordStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
82 MCStreamer::EmitAssignment(Symbol, Value);
85 bool RecordStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
86 MCSymbolAttr Attribute) {
87 if (Attribute == MCSA_Global)
92 void RecordStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
93 uint64_t Size, unsigned ByteAlignment) {
97 void RecordStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
98 unsigned ByteAlignment) {