made get_entity_nr() 64bit safe
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Feb 2006 13:59:59 +0000 (13:59 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Feb 2006 13:59:59 +0000 (13:59 +0000)
get_entity_nr() now returns the casted address, like all other *_nr() functions

[r7366]

ir/tr/entity.c
ir/tr/entity.h

index a89b3c0..6000f39 100644 (file)
@@ -267,7 +267,7 @@ get_entity_nr(entity *ent) {
 #ifdef DEBUG_libfirm
   return ent->nr;
 #else
-  return 0;
+  return (long)PTR_TO_INT(ent);
 #endif
 }
 
index e6299ff..656effc 100644 (file)
@@ -512,7 +512,9 @@ int is_compound_entity(entity *ent);
 int equal_entity(entity *ent1, entity *ent2);
 
 /** Outputs a unique number for this entity if libfirm is compiled for
-   debugging, (configure with --enable-debug) else returns 0. */
+ *  debugging, (configure with --enable-debug) else returns the address
+ *  of the type cast to long.
+ */
 long get_entity_nr(entity *ent);
 
 /** Returns the entities visited count. */