From ed735d336049ea5c05aca2efb5eb5b9086732dd9 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 15 Aug 2014 14:24:41 +0000 Subject: Make ForceExpAbs an static helper. llvm-svn: 215715 --- llvm/lib/MC/MCStreamer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/MC') diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 9ee5dec8b31..ffbdc7111d5 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -69,13 +69,14 @@ const MCExpr *MCStreamer::BuildSymbolDiff(MCContext &Context, return AddrDelta; } -const MCExpr *MCStreamer::ForceExpAbs(const MCExpr* Expr) { +static const MCExpr *forceExpAbs(MCStreamer &OS, const MCExpr* Expr) { + MCContext &Context = OS.getContext(); assert(!isa(Expr)); if (Context.getAsmInfo()->hasAggressiveSymbolFolding()) return Expr; MCSymbol *ABS = Context.CreateTempSymbol(); - EmitAssignment(ABS, Expr); + OS.EmitAssignment(ABS, Expr); return MCSymbolRefExpr::Create(ABS, Context); } @@ -138,7 +139,7 @@ void MCStreamer::EmitSLEB128IntValue(int64_t Value) { } void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) { - const MCExpr *ABS = ForceExpAbs(Value); + const MCExpr *ABS = forceExpAbs(*this, Value); EmitValue(ABS, Size); } -- cgit v1.2.3