Put UCodeBlock get functions in a more sensible place -- moved from vg_needs.c
to vg_translate.c, where the other UCodeBlock functions live.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2557 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_translate.c b/coregrind/vg_translate.c
index 6412a58..716b426 100644
--- a/coregrind/vg_translate.c
+++ b/coregrind/vg_translate.c
@@ -339,6 +339,26 @@
    }
 }
 
+Int VG_(get_num_instrs) ( UCodeBlock* cb )
+{
+   return cb->used;
+}
+
+Int VG_(get_num_temps) ( UCodeBlock* cb )
+{
+   return cb->nextTemp;
+}
+
+UInstr* VG_(get_instr) ( UCodeBlock* cb, Int i )
+{
+   return & cb->instrs[i];
+}
+
+UInstr* VG_(get_last_instr) ( UCodeBlock* cb )
+{
+   return & cb->instrs[cb->used-1];
+}
+   
 
 /*------------------------------------------------------------*/
 /*--- Sanity checking uinstrs.                             ---*/