diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-15 14:24:41 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-15 14:24:41 +0000 |
commit | ed735d336049ea5c05aca2efb5eb5b9086732dd9 (patch) | |
tree | 0006d65093db4bc62194edb5b081bbdb0cff92fd /llvm/lib/MC | |
parent | 8e7f99647d2ebe94878fd956f193d3cab13163e9 (diff) | |
download | bcm5719-llvm-ed735d336049ea5c05aca2efb5eb5b9086732dd9.tar.gz bcm5719-llvm-ed735d336049ea5c05aca2efb5eb5b9086732dd9.zip |
Make ForceExpAbs an static helper.
llvm-svn: 215715
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<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(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); } |