[llvm] r215715 - Make ForceExpAbs an static helper.
Rafael Espindola
rafael.espindola at gmail.com
Fri Aug 15 07:24:41 PDT 2014
Author: rafael
Date: Fri Aug 15 09:24:41 2014
New Revision: 215715
URL: http://llvm.org/viewvc/llvm-project?rev=215715&view=rev
Log:
Make ForceExpAbs an static helper.
Modified:
llvm/trunk/include/llvm/MC/MCStreamer.h
llvm/trunk/lib/MC/MCStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCStreamer.h?rev=215715&r1=215714&r2=215715&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCStreamer.h (original)
+++ llvm/trunk/include/llvm/MC/MCStreamer.h Fri Aug 15 09:24:41 2014
@@ -199,8 +199,6 @@ protected:
const MCExpr *BuildSymbolDiff(MCContext &Context, const MCSymbol *A,
const MCSymbol *B);
- const MCExpr *ForceExpAbs(const MCExpr *Expr);
-
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame);
Modified: llvm/trunk/lib/MC/MCStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCStreamer.cpp?rev=215715&r1=215714&r2=215715&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCStreamer.cpp Fri Aug 15 09:24:41 2014
@@ -69,13 +69,14 @@ const MCExpr *MCStreamer::BuildSymbolDif
return AddrDelta;
}
-const MCExpr *MCStreamer::ForceExpAbs(const MCExpr* Expr) {
+static const MCExpr *forceExpAbs(MCStreamer &OS, const MCExpr* Expr) {
+ MCContext &Context = OS.getContext();
assert(!isa<MCSymbolRefExpr>(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(int
}
void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) {
- const MCExpr *ABS = ForceExpAbs(Value);
+ const MCExpr *ABS = forceExpAbs(*this, Value);
EmitValue(ABS, Size);
}
More information about the llvm-commits
mailing list