[LLVMdev] Can llvm-2.5 work with "-O1 -g"?

Devang Patel devang.patel at gmail.com
Mon Jun 8 10:38:28 PDT 2009


On Sat, Jun 6, 2009 at 8:56 AM, <hc2428 at columbia.edu> wrote:
> Dear staff,
>
>     I need to get the line number and file name information of the
> source code for each instruction in *.bc file. I find that llvm-2.4
> can not support "-O1 -g", which means if we are at O1 to O3
> optimization level, we can not get any dbg.stoppoint inserted into the
> LLVM IR.
>
>     However, our project requires us to get the line number and file
> name information of the source code for each instruction in *.bc file
> at any Ox level. I have built and run llvm-2.5 and found that it still
> can not support "-Ox -g".
>
>     If we are not using "-g", do we have other ways to get the line
> number and file name information for each instruction in *.bc file?


llvm-gcc and llvm sources in mainline svn repository supports location
information at various optimization levels (it is not supported at -O4
level at the moment)

-
Devang




More information about the llvm-dev mailing list