[llvm-commits] [llvm] r76117 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp test/FrontendC++/2009-07-15-LineNumbers.cpp

David Greene dag at cray.com
Fri Jul 17 11:49:21 PDT 2009


On Friday 17 July 2009 11:24, Chris Lattner wrote:

> Please only emit comments if the "-asm-verbose" LLC flag is set.

Hrm...How do I do that in a file that could be linked with many different
executables?  Do I add an option in AsmPrinter.cpp and have LLC set it
if -asm-verbose is set, or any other tool set it as they see fit?

I'm fine making the change, I'd just like some guidance as how to make
it the least ugly thing possible.  :)

> Also, have you considered adding the filename (without leading path)
> to the generated comments?  It would be nice to see something like:
>
>    foo     # Loc: x.c:2:42

I considered the filename but thought it would be redundant with the
asm file name.  Isn't <file>.bc generated as <file>.s?  Yes, users
can override that, but then don't they know where the asm came from?
Adding the filename seems like useless clutter.

> Also, the column # should only print if non-zero.

I thought about that too.  I'll make the change.

                               -Dave



More information about the llvm-commits mailing list