Spread some const around for non-mutating uses of MCSymbolData.

I discovered this const-hole while attempting to coalesnce the Symbol
and SymbolMap data structures. There's some pending issues with that,
but I figured this change was easy to flush early.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-24 16:59:40 +00:00
parent 25fb047609
commit 45966fa1f1
9 changed files with 33 additions and 26 deletions

View File

@@ -686,7 +686,7 @@ void WinCOFFObjectWriter::RecordRelocation(const MCAssembler &Asm,
Fixup.getLoc(),
Twine("symbol '") + A.getName() + "' can not be undefined");
MCSymbolData &A_SD = Asm.getSymbolData(A);
const MCSymbolData &A_SD = Asm.getSymbolData(A);
MCSectionData const *SectionData = Fragment->getParent();
@@ -703,7 +703,7 @@ void WinCOFFObjectWriter::RecordRelocation(const MCAssembler &Asm,
if (SymB) {
const MCSymbol *B = &SymB->getSymbol();
MCSymbolData &B_SD = Asm.getSymbolData(*B);
const MCSymbolData &B_SD = Asm.getSymbolData(*B);
if (!B_SD.getFragment())
Asm.getContext().FatalError(
Fixup.getLoc(),