Fix warning on MSVC by using size_t arithmetic instead of casting after the fact...
authorFilipe Cabecinhas <me@filcab.net>
Thu, 28 Jun 2018 12:38:43 +0000 (12:38 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Thu, 28 Jun 2018 12:38:43 +0000 (12:38 +0000)
llvm-svn: 335848

lld/COFF/SymbolTable.cpp

index 6b07c35..b80a9fd 100644 (file)
@@ -189,7 +189,7 @@ void SymbolTable::reportRemainingUndefines() {
   }
 
   for (ObjFile *File : ObjFile::Instances) {
-    size_t SymIndex = -1ull;
+    size_t SymIndex = size_t{0} - 1;
     for (Symbol *Sym : File->getSymbols()) {
       ++SymIndex;
       if (!Sym)