Martin Rathgeber
2010-Jul-14 11:39 UTC
[LLVMdev] Preserve debug information using 'llc -march=c'
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 ? Thanks in advance Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100714/5fa6fa7c/attachment.html>
Devang Patel
2010-Jul-14 18:28 UTC
[LLVMdev] Preserve debug information using 'llc -march=c'
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. - Devang