mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Add an EmitAbsValue helper method and use it in cases where we want to be sure
that no relocations are used (on MochO). Fixes llc producing different output from llc + llvm-mc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121000 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -72,6 +72,12 @@ void MCStreamer::EmitSLEB128IntValue(int64_t Value, unsigned AddrSpace) {
|
||||
EmitBytes(OSE.str(), AddrSpace);
|
||||
}
|
||||
|
||||
void MCStreamer::EmitAbsValue(const MCExpr *Value, unsigned Size) {
|
||||
MCSymbol *ABS = getContext().CreateTempSymbol();
|
||||
EmitAssignment(ABS, Value);
|
||||
EmitSymbolValue(ABS, Size, 0);
|
||||
}
|
||||
|
||||
void MCStreamer::EmitSymbolValue(const MCSymbol *Sym, unsigned Size,
|
||||
unsigned AddrSpace) {
|
||||
EmitValue(MCSymbolRefExpr::Create(Sym, getContext()), Size, AddrSpace);
|
||||
|
Reference in New Issue
Block a user