Literal* UseLiteral (Literal* L) /* Increase the reference counter for the literal and return it */ { /* Increase the reference count */ ++L->RefCount; /* If --local-strings was given, immediately output the literal */ if (IS_Get (&LocalStrings)) { /* Switch to the proper data segment */ if (IS_Get (&WritableStrings)) { g_usedata (); } else { g_userodata (); } /* Output the literal */ OutputLiteral (L); } /* Return the literal */ return L; }
void DumpLiteralPool (void) /* Dump the literal pool */ { /* If nothing there, exit... */ if (SB_GetLen (&LiteralPool) == 0) { return; } /* Switch to the data segment */ if (IS_Get (&WritableStrings)) { g_usedata (); } else { g_userodata (); } /* Define the label */ g_defdatalabel (LiteralPoolLabel); /* Translate the buffer contents into the target charset */ TranslateLiteralPool (0); /* Output the buffer data */ g_defbytes (SB_GetConstBuf (&LiteralPool), SB_GetLen (&LiteralPool)); }