[LLVMdev] suspicious typo in MCObjectDisassembler.cpp

Eric Christopher echristo at gmail.com
Thu Jul 31 11:37:16 PDT 2014


I believe you are correct. Fixed thusly:

dzur:~/sources/llvm> git svn dcommit
Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
M lib/MC/MCAnalysis/MCObjectDisassembler.cpp
Committed r214416

-eric


On Thu, Jul 31, 2014 at 10:26 AM, xliu <navy.xliu at gmail.com> wrote:
> my compiler gave me a warning in MCObjectDisassembler.cpp. it found a
> self-comparation in loop condition. I think it's a typo.
>
> the suspicious code was introduced by this patch:
>
> From f176482752fbea3139394e280adfb10270dd3aac Mon Sep 17 00:00:00 2001
> From: Ahmed Bougacha <ahmed.bougacha at gmail.com>
> Date: Wed, 21 Aug 2013 07:28:55 +0000
> Subject: MC CFG: Support disassembly at arbitrary addresses in
> MCObjectDisassembler.
>
> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188889
> 91177308-0d34-0410-b5e6-96231b3b80d8
>
>
> please review "SE != SE" below. i think it should be SI != SE.
>
>
> + for (AddressSetTy::const_iterator SI = BBI->SuccAddrs.begin(),
> + SE = BBI->SuccAddrs.end();
> + SE != SE; ++SI) {
>
>
> thanks,
> --lx
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list