[lld] r244653 - Fix mismatched sign comparison

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 13:31:35 PDT 2015


Thanks

On 11 August 2015 at 16:06, Reid Kleckner via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: rnk
> Date: Tue Aug 11 15:06:51 2015
> New Revision: 244653
>
> URL: http://llvm.org/viewvc/llvm-project?rev=244653&view=rev
> Log:
> Fix mismatched sign comparison
>
> Modified:
>     lld/trunk/ELF/InputFiles.cpp
>
> Modified: lld/trunk/ELF/InputFiles.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=244653&r1=244652&r2=244653&view=diff
> ==============================================================================
> --- lld/trunk/ELF/InputFiles.cpp (original)
> +++ lld/trunk/ELF/InputFiles.cpp Tue Aug 11 15:06:51 2015
> @@ -59,7 +59,7 @@ template <class ELFT> void elf2::ObjectF
>    StringRef StringTable = *StringTableOrErr;
>
>    Elf_Sym_Range Syms = ELFObj->symbols(Symtab);
> -  auto NumSymbols = std::distance(Syms.begin(), Syms.end());
> +  uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end());
>    uint32_t FirstNonLocal = Symtab->sh_info;
>    if (FirstNonLocal > NumSymbols)
>      error("Invalid sh_info in symbol table");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list