[LLVMdev] Preserve debug information using 'llc -march=c'

Devang Patel devang.patel at gmail.com
Wed Jul 14 11:28:51 PDT 2010

On Wed, Jul 14, 2010 at 4:39 AM, Martin Rathgeber
<rathgeber.martin at googlemail.com> wrote:
> Hi!
> Since version 1.4 of LLVM it is possible to emit source line number
> information to the LLVM-bytecode using llvm-gcc or llvm-g++ with the
> '-g'-option. But if I use 'llc -march=c' to transform this bytecode back to
> sourcecode this information gets lost.
> Is there a command line option for 'llc' which allows to keep
> source-line-number information
> or is there another easy way how I can do that ?

The CBackend (-march=c) does not emit debug info into regenerated C code.
Other backends (e.g. x86) does not loose debug info at -O0.

More information about the llvm-dev mailing list