mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +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 MCSymbol *B);
|
||||
|
||||
const MCExpr *ForceExpAbs(const MCExpr *Expr);
|
||||
|
||||
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
|
||||
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user