mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-20 11:08:27 +00:00
Make ForceExpAbs an static helper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215715 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
216fdfe9ac
commit
abe3774e07
@ -199,8 +199,6 @@ protected:
|
|||||||
const MCExpr *BuildSymbolDiff(MCContext &Context, const MCSymbol *A,
|
const MCExpr *BuildSymbolDiff(MCContext &Context, const MCSymbol *A,
|
||||||
const MCSymbol *B);
|
const MCSymbol *B);
|
||||||
|
|
||||||
const MCExpr *ForceExpAbs(const MCExpr *Expr);
|
|
||||||
|
|
||||||
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
|
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
|
||||||
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame);
|
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame);
|
||||||
|
|
||||||
|
@ -69,13 +69,14 @@ const MCExpr *MCStreamer::BuildSymbolDiff(MCContext &Context,
|
|||||||
return AddrDelta;
|
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));
|
assert(!isa<MCSymbolRefExpr>(Expr));
|
||||||
if (Context.getAsmInfo()->hasAggressiveSymbolFolding())
|
if (Context.getAsmInfo()->hasAggressiveSymbolFolding())
|
||||||
return Expr;
|
return Expr;
|
||||||
|
|
||||||
MCSymbol *ABS = Context.CreateTempSymbol();
|
MCSymbol *ABS = Context.CreateTempSymbol();
|
||||||
EmitAssignment(ABS, Expr);
|
OS.EmitAssignment(ABS, Expr);
|
||||||
return MCSymbolRefExpr::Create(ABS, Context);
|
return MCSymbolRefExpr::Create(ABS, Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +139,7 @@ void MCStreamer::EmitSLEB128IntValue(int64_t Value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) {
|
void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) {
|
||||||
const MCExpr *ABS = ForceExpAbs(Value);
|
const MCExpr *ABS = forceExpAbs(*this, Value);
|
||||||
EmitValue(ABS, Size);
|
EmitValue(ABS, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user