mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
llvm-mc: Add symbol entries for undefined symbols used in .fill and .org.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cd76128f18
commit
a421de11df
@ -72,6 +72,14 @@ public:
|
||||
: MCStreamer(Context), Assembler(_OS), CurSectionData(0) {}
|
||||
~MCMachOStreamer() {}
|
||||
|
||||
const MCValue &AddValueSymbols(const MCValue &Value) {
|
||||
if (Value.getSymA())
|
||||
getSymbolData(*const_cast<MCSymbol*>(Value.getSymA()));
|
||||
if (Value.getSymB())
|
||||
getSymbolData(*const_cast<MCSymbol*>(Value.getSymB()));
|
||||
return Value;
|
||||
}
|
||||
|
||||
/// @name MCStreamer Interface
|
||||
/// @{
|
||||
|
||||
@ -265,7 +273,7 @@ void MCMachOStreamer::EmitBytes(const StringRef &Data) {
|
||||
}
|
||||
|
||||
void MCMachOStreamer::EmitValue(const MCValue &Value, unsigned Size) {
|
||||
new MCFillFragment(Value, Size, 1, CurSectionData);
|
||||
new MCFillFragment(AddValueSymbols(Value), Size, 1, CurSectionData);
|
||||
}
|
||||
|
||||
void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment,
|
||||
@ -283,7 +291,7 @@ void MCMachOStreamer::EmitValueToAlignment(unsigned ByteAlignment,
|
||||
|
||||
void MCMachOStreamer::EmitValueToOffset(const MCValue &Offset,
|
||||
unsigned char Value) {
|
||||
new MCOrgFragment(Offset, Value, CurSectionData);
|
||||
new MCOrgFragment(AddValueSymbols(Offset), Value, CurSectionData);
|
||||
}
|
||||
|
||||
void MCMachOStreamer::EmitInstruction(const MCInst &Inst) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user