aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index e58e095..f5435c6 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -376,7 +376,7 @@ const MCSymbol &MachObjectWriter::findAliasedSymbol(const MCSymbol &Sym) const {
void MachObjectWriter::writeNlist(MachSymbolData &MSD, const MCAssembler &Asm) {
const MCSymbol *Symbol = MSD.Symbol;
- const MCSymbol &Data = *Symbol;
+ const auto &Data = cast<MCSymbolMachO>(*Symbol);
const MCSymbol *AliasedSymbol = &findAliasedSymbol(*Symbol);
uint8_t SectionIndex = MSD.SectionIndex;
uint8_t Type = 0;