From 6afb0ae02319c56080dec9ffb902f02471331595 Mon Sep 17 00:00:00 2001 From: Brian Gernhardt Date: Thu, 16 Jun 2011 15:51:29 -0400 Subject: [PATCH] [pct] Add file annotations to generated PIR This allows all users of PCT::HLLCompiler to keep knowledge of the source file in the final result. Closes TT #2132 --- compilers/pct/src/POST/Compiler.pir | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/compilers/pct/src/POST/Compiler.pir b/compilers/pct/src/POST/Compiler.pir index bf8b9bf..0e4c6e2 100644 --- a/compilers/pct/src/POST/Compiler.pir +++ b/compilers/pct/src/POST/Compiler.pir @@ -397,6 +397,14 @@ the sub. goto param_loop paramlist_done: + ## Add a file annotation + .local pmc files + files = find_caller_lex '$?FILES' + if null files goto no_files + unless files goto no_files + subpir.'append_format'(".annotate 'file', '%0'\n", files) + no_files: + self.'pir_children'(node) subpir.'append_format'(".end\n\n") -- 1.7.6.rc1.284.ge29cf