diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp index 8e771cea6b75..ec8e9f5412e3 100644 --- a/lld/COFF/InputFiles.cpp +++ b/lld/COFF/InputFiles.cpp @@ -202,7 +202,7 @@ SymbolBody *ObjectFile::createSymbolBody(StringRef Name, COFFSymbolRef Sym, } if (IsFirst && AuxP) { if (Chunk *C = SparseChunks[Sym.getSectionNumber()]) { - auto *Aux = (coff_aux_section_definition *)const_cast(AuxP); + auto *Aux = reinterpret_cast(AuxP); auto *Parent = (SectionChunk *)(SparseChunks[Aux->getNumber(Sym.isBigObj())]); if (Parent)