OSDN Git Service

ART: Reset bb id to the last list mir
authorChao-ying Fu <chao-ying.fu@intel.com>
Tue, 23 Sep 2014 21:54:32 +0000 (14:54 -0700)
committerChao-ying Fu <chao-ying.fu@intel.com>
Tue, 23 Sep 2014 21:55:21 +0000 (14:55 -0700)
This patch fixes a bug in RemoveMIRList() to reset bb id to
the last list mir.

Change-Id: I0384d8d22e357b69725f455772f55296c50bc1d3
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
compiler/dex/mir_graph.cc

index ce56255..93b774c 100644 (file)
@@ -1175,7 +1175,7 @@ bool BasicBlock::RemoveMIRList(MIR* first_list_mir, MIR* last_list_mir) {
   }
 
   // Remove the BB information and also find the after_list.
-  for (MIR* mir = first_list_mir; mir != last_list_mir; mir = mir->next) {
+  for (MIR* mir = first_list_mir; mir != last_list_mir->next; mir = mir->next) {
     mir->bb = NullBasicBlockId;
   }