diff options
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r-- | lib/MC/MCStreamer.cpp | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 6f9692d227..e003a953ad 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -85,31 +85,9 @@ void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size, EmitSymbolValue(ABS, Size, AddrSpace); } - -void MCStreamer::EmitValue(const MCExpr *Value, unsigned Size, - unsigned AddrSpace) { - EmitValueImpl(Value, Size, false, AddrSpace); -} - -void MCStreamer::EmitPCRelValue(const MCExpr *Value, unsigned Size, - unsigned AddrSpace) { - EmitValueImpl(Value, Size, true, AddrSpace); -} - -void MCStreamer::EmitSymbolValue(const MCSymbol *Sym, unsigned Size, - bool isPCRel, unsigned AddrSpace) { - EmitValueImpl(MCSymbolRefExpr::Create(Sym, getContext()), Size, isPCRel, - AddrSpace); -} - void MCStreamer::EmitSymbolValue(const MCSymbol *Sym, unsigned Size, unsigned AddrSpace) { - EmitSymbolValue(Sym, Size, false, AddrSpace); -} - -void MCStreamer::EmitPCRelSymbolValue(const MCSymbol *Sym, unsigned Size, - unsigned AddrSpace) { - EmitSymbolValue(Sym, Size, true, AddrSpace); + EmitValue(MCSymbolRefExpr::Create(Sym, getContext()), Size, AddrSpace); } void MCStreamer::EmitGPRel32Value(const MCExpr *Value) { @@ -138,65 +116,31 @@ void MCStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line, Discriminator); } -MCDwarfFrameInfo *MCStreamer::getCurrentFrameInfo() { - if (FrameInfos.empty()) - return NULL; - return &FrameInfos.back(); -} - -void MCStreamer::EnsureValidFrame() { - MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); - if (!CurFrame || CurFrame->End) - report_fatal_error("No open frame"); -} - bool MCStreamer::EmitCFIStartProc() { - MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); - if (CurFrame && !CurFrame->End) { - report_fatal_error("Starting a frame before finishing the previous one!"); - return true; - } - MCDwarfFrameInfo Frame = {0, 0, 0, 0}; - Frame.Begin = getContext().CreateTempSymbol(); - EmitLabel(Frame.Begin); - FrameInfos.push_back(Frame); return false; } bool MCStreamer::EmitCFIEndProc() { - EnsureValidFrame(); - MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); - CurFrame->End = getContext().CreateTempSymbol(); - EmitLabel(CurFrame->End); return false; } bool MCStreamer::EmitCFIDefCfaOffset(int64_t Offset) { - EnsureValidFrame(); return false; } bool MCStreamer::EmitCFIDefCfaRegister(int64_t Register) { - EnsureValidFrame(); return false; } bool MCStreamer::EmitCFIOffset(int64_t Register, int64_t Offset) { - EnsureValidFrame(); return false; } bool MCStreamer::EmitCFIPersonality(const MCSymbol *Sym) { - EnsureValidFrame(); - MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); - CurFrame->Personality = Sym; return false; } bool MCStreamer::EmitCFILsda(const MCSymbol *Sym) { - EnsureValidFrame(); - MCDwarfFrameInfo *CurFrame = getCurrentFrameInfo(); - CurFrame->Lsda = Sym; return false; } |