added ir_quit
[henge/webcc.git] / src / apc / ir.c
index bf62227..d31bc1a 100644 (file)
@@ -197,11 +197,12 @@ insert_set_svlink
   curr_cdatp = curr_cdat();
   curr_linkp = alloc_link();
 
-  /* Insert vlink into link_stack so that it gets processed at
+  /* Insert svlink into link_stack so that it gets processed at
      output time */
   curr_linkp->type = 3;
   curr_linkp->cdat_idx = curr_cdatp->idx;
   curr_linkp->set_idx = curr_cdatp->num_sets;
+  curr_linkp->ele_idx = -1;
   curr_linkp->link_t.svlink.ref_id = ref_id;
 
 }
@@ -280,6 +281,8 @@ insert_ele_label
   curr_elep->ref_id = ref_id;
 }
 
+/* We don't make an odat here, at output time we will resolve
+   the ref_id to the corresponding odat. */
 void
 insert_ele_olink
 ( uint64_t ref_id
@@ -295,8 +298,8 @@ insert_ele_olink
   curr_linkp = alloc_link();
 
   curr_elep->cdat_idx = curr_cdatp->idx;
-  curr_elep->ref_id = ref_id; /* Will be resolved to offset
-                                                   when link is processed */
+  curr_elep->ref_id = ref_id;
+
   curr_linkp->type = 1;
   curr_linkp->link_t.olink.ref_id = ref_id;
   curr_linkp->cdat_idx = curr_cdatp->idx;