File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,10 @@ static void print_basic_block(PrinterCtx* ctx, const Node* bb) {
126126 printf (GREEN );
127127 printf ("\n\ncont" );
128128 printf (BYELLOW );
129- printf (" %s" , bb -> payload .basic_block .name );
129+ if (bb -> payload .basic_block .name && strlen (bb -> payload .basic_block .name ) > 0 )
130+ printf (" %s" , bb -> payload .basic_block .name );
131+ else
132+ printf (" %%%d" , bb -> id );
130133 printf (RESET );
131134 if (ctx -> config .print_ptrs ) {
132135 printf (" %zu:: " , (size_t )(void * )bb );
@@ -948,7 +951,10 @@ static void print_node_impl(PrinterCtx* ctx, const Node* node) {
948951 }
949952 case BasicBlock_TAG : {
950953 printf (BYELLOW );
951- printf ("%s" , node -> payload .basic_block .name );
954+ if (node -> payload .basic_block .name && strlen (node -> payload .basic_block .name ) > 0 )
955+ printf ("%s" , node -> payload .basic_block .name );
956+ else
957+ printf ("%%%d" , node -> id );
952958 printf (RESET );
953959 break ;
954960 }
You can’t perform that action at this time.
0 commit comments