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 2001From: 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 at 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
Eric Christopher
2014-Jul-31 18:37 UTC
[LLVMdev] suspicious typo in MCObjectDisassembler.cpp
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 at 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
Any chance of adding some missing test coverage here? That code was dead (& evidently untested) before... On Thu, Jul 31, 2014 at 11:37 AM, Eric Christopher <echristo at gmail.com> wrote:> 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 at 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 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] suspicious typo in MCObjectDisassembler.cpp
- [LLVMdev] Removing lib/MC/MCObjectDisassembler (and more?)
- [LLVMdev] Removing lib/MC/MCObjectDisassembler (and more?)
- Is MCRelocationInfo::createExprForRelocation used out of tree?
- Representing MIPS ABI information in the triple as ARM/X86 do for EABI/EABIHF/X32