output: use mapped file name for symbols

Applies the file name mapping before exporting it as a symbol. This
allows the symbols to correctly respect the --file-prefix-map command
line option.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
This commit is contained in:
Joshua Watt
2021-02-16 08:00:28 -06:00
committed by Akim Demaille
parent 4511e43245
commit b96528b48c
2 changed files with 9 additions and 3 deletions

View File

@@ -204,8 +204,10 @@ static void
muscle_syncline_grow (char const *key, location loc)
{
obstack_printf (&muscle_obstack, "]b4_syncline(%d, ", loc.start.line);
char *f = map_file_name (loc.start.file);
obstack_quote (&muscle_obstack,
quotearg_style (c_quoting_style, loc.start.file));
quotearg_style (c_quoting_style, f));
free (f);
obstack_sgrow (&muscle_obstack, ")dnl\n[");
char const *extension = obstack_finish0 (&muscle_obstack);
muscle_grow (key, extension, "", "");