[lld] r238786 - Use reinterpret_cast instead of const_cast and C-style cast.

Rui Ueyama ruiu at google.com
Mon Jun 1 14:49:22 PDT 2015


Author: ruiu
Date: Mon Jun  1 16:49:21 2015
New Revision: 238786

URL: http://llvm.org/viewvc/llvm-project?rev=238786&view=rev
Log:
Use reinterpret_cast instead of const_cast and C-style cast.

Modified:
    lld/trunk/COFF/InputFiles.cpp

Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=238786&r1=238785&r2=238786&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Mon Jun  1 16:49:21 2015
@@ -202,7 +202,7 @@ SymbolBody *ObjectFile::createSymbolBody
   }
   if (IsFirst && AuxP) {
     if (Chunk *C = SparseChunks[Sym.getSectionNumber()]) {
-      auto *Aux = (coff_aux_section_definition *)const_cast<void *>(AuxP);
+      auto *Aux = reinterpret_cast<const coff_aux_section_definition *>(AuxP);
       auto *Parent =
           (SectionChunk *)(SparseChunks[Aux->getNumber(Sym.isBigObj())]);
       if (Parent)





More information about the llvm-commits mailing list