From: Piramanayagam A. N. <ar...@cs...> - 2011-10-27 19:02:23
|
For a down-stream analysis that reads CIL instrumented files, I need #line pragmas for local variables. I can do that by redefining 'pVDecl' in my CIL printer. But, when printing a function definition, defaultCilPrinterClass doesn't add a new line after the opening curly brace. So, it prints > foo() > { int cil_tmp; This causes a pre-processor error if I print the #line before the variable declaration. > foo() > { # 12 bar.c > int cil_tmp; This patch adds a new line after the curly brace. Since pFunDecl is private, I cannot solve it by redefining pFunDecl in a subclass of defaultCilPrinterClass. I'm submitting this patch so it can make it in the new release. Having local changes to the CIL tree (albeit 1 line) is still a headache :) Thanks, -Arumuga |