mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
MC: Change MCAssembler::Symbols to store MCSymbol, NFC
Instead of storing a list of the `MCSymbolData` in use, store the `MCSymbol`s. Churning in the direction of removing the back pointer from `MCSymbolData`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -548,8 +548,7 @@ void MachObjectWriter::ComputeSymbolTable(
|
||||
assert(Index <= 256 && "Too many sections!");
|
||||
|
||||
// Build the string table.
|
||||
for (MCSymbolData &SD : Asm.symbols()) {
|
||||
const MCSymbol &Symbol = SD.getSymbol();
|
||||
for (const MCSymbol &Symbol : Asm.symbols()) {
|
||||
if (!Asm.isSymbolLinkerVisible(Symbol))
|
||||
continue;
|
||||
|
||||
@ -562,8 +561,8 @@ void MachObjectWriter::ComputeSymbolTable(
|
||||
// The particular order that we collect and then sort the symbols is chosen to
|
||||
// match 'as'. Even though it doesn't matter for correctness, this is
|
||||
// important for letting us diff .o files.
|
||||
for (MCSymbolData &SD : Asm.symbols()) {
|
||||
const MCSymbol &Symbol = SD.getSymbol();
|
||||
for (const MCSymbol &Symbol : Asm.symbols()) {
|
||||
MCSymbolData &SD = Symbol.getData();
|
||||
|
||||
// Ignore non-linker visible symbols.
|
||||
if (!Asm.isSymbolLinkerVisible(Symbol))
|
||||
@ -590,8 +589,8 @@ void MachObjectWriter::ComputeSymbolTable(
|
||||
}
|
||||
|
||||
// Now add the data for local symbols.
|
||||
for (MCSymbolData &SD : Asm.symbols()) {
|
||||
const MCSymbol &Symbol = SD.getSymbol();
|
||||
for (const MCSymbol &Symbol : Asm.symbols()) {
|
||||
MCSymbolData &SD = Symbol.getData();
|
||||
|
||||
// Ignore non-linker visible symbols.
|
||||
if (!Asm.isSymbolLinkerVisible(Symbol))
|
||||
|
Reference in New Issue
Block a user