diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-20 20:18:16 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-20 20:18:16 +0000 |
| commit | 92a699c50e0a3d7627634af5a2a850a4b82ac21b (patch) | |
| tree | c79560ec07d0af93bfb5cc997a678a40b205cbc1 /llvm/lib/MC/MCMachOStreamer.cpp | |
| parent | a74480d1eb726cac1372f995e7b96dac899cf5da (diff) | |
| download | bcm5719-llvm-92a699c50e0a3d7627634af5a2a850a4b82ac21b.tar.gz bcm5719-llvm-92a699c50e0a3d7627634af5a2a850a4b82ac21b.zip | |
MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC
Remove most remaining calls to `MCSymbolData::getSymbol()`, instead
using the already available `MCSymbol` directly.
llvm-svn: 237829
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCMachOStreamer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp index ab26b5d0f5c..c0efc8e17bd 100644 --- a/llvm/lib/MC/MCMachOStreamer.cpp +++ b/llvm/lib/MC/MCMachOStreamer.cpp @@ -464,13 +464,13 @@ void MCMachOStreamer::FinishImpl() { // First, scan the symbol table to build a lookup table from fragments to // defining symbols. - DenseMap<const MCFragment*, MCSymbolData*> DefiningSymbolMap; + DenseMap<const MCFragment *, const MCSymbol *> DefiningSymbolMap; for (const MCSymbol &Symbol : getAssembler().symbols()) { MCSymbolData &SD = Symbol.getData(); if (getAssembler().isSymbolLinkerVisible(Symbol) && SD.getFragment()) { // An atom defining symbol should never be internal to a fragment. assert(SD.getOffset() == 0 && "Invalid offset in atom defining symbol!"); - DefiningSymbolMap[SD.getFragment()] = &SD; + DefiningSymbolMap[SD.getFragment()] = &Symbol; } } @@ -481,8 +481,8 @@ void MCMachOStreamer::FinishImpl() { const MCSymbol *CurrentAtom = nullptr; for (MCSectionData::iterator it2 = it->begin(), ie2 = it->end(); it2 != ie2; ++it2) { - if (MCSymbolData *SD = DefiningSymbolMap.lookup(it2)) - CurrentAtom = &SD->getSymbol(); + if (const MCSymbol *Symbol = DefiningSymbolMap.lookup(it2)) + CurrentAtom = Symbol; it2->setAtom(CurrentAtom); } } |

