seem to produce an executable that gdb7 has some issues with, such as inability to examine variables… (but stepping/nexting seem to be okay, and line numbers show up properly
So is this an llvm-gcc issue? or is this an issue with llvm itself?
I’m willing to help out on this, so someone please point me in the right direction.
As Eli mentioned, add -O0 on llc command line. Otherwise llc by
default runs code gen optimizations and transformations to improve
code, which are disabled when you run llvm-gcc without any
optimization flag.
The issue is at llvm code gen phase. The optimization phases are
removing variable's info in your case because probably it is
interfering with the optimization. If you've a small test case then
please file bugzilla report. Supporting debugging of optimized code is
a challenging task.