Debug Info generation for C language.

Hi,

We are done with the generation of debug info for C source constructs.
The changes are checked-in. We have done a little-bit of testing from
our side, the changes are now ready for further testing. Let us know if
you encounter any issues.

Thanks,
Sanjiv

Hi Sanjiv,

We are done with the generation of debug info for C source constructs.

Very nice!

Do you have any plans for making the optimization passes work in the face of
debug intrinsics?

Gr.

Matthijs

Hi,

We are done with the generation of debug info for C source constructs.
The changes are checked-in. We have done a little-bit of testing from
our side, the changes are now ready for further testing. Let us know if
you encounter any issues.
  
It doesn't work at all for me.

When using this test case (t.c):

int main()
{
  return 0;
}

On linux I get an assertion error:

> clang -g -emit-llvm-bc t.c -o t.bc
> llc t.bc

llc: /home/argiris/llvm/include/llvm/Support/Casting.h:199: typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X = llvm::SubprogramDesc, Y = llvm::DebugInfoDesc*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
llc[0x8924be6]
llc[0x8924d18]
[0xb7f6a420]
/lib/i686/libc.so.6(abort+0x101)[0xb7d2f851]
/lib/i686/libc.so.6(__assert_fail+0xfb)[0xb7d2753b]
llc(_ZN4llvm4castINS_14SubprogramDescEPNS_13DebugInfoDescEEENS_10cast_rettyIT_T0_E8ret_typeERKS6_+0x4c)[0x861566c]
llc(_ZN4llvm10DwarfDebug18ConstructRootScopeEPNS_10DebugScopeE+0x29)[0x86c9a8b]
llc(_ZN4llvm10DwarfDebug11EndFunctionEv+0x19c)[0x86c9d8a]
llc(_ZN4llvm11DwarfWriter11EndFunctionEv+0x14)[0x86b19fc]
llc[0x8404bdf]
llc(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x28)[0x8465822]
llc(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x13d)[0x88b2913]
llc(_ZN4llvm23FunctionPassManagerImpl3runERNS_8FunctionE+0x6e)[0x88b2b7c]
llc(_ZN4llvm19FunctionPassManager3runERNS_8FunctionE+0x89)[0x88b2ccb]
llc(main+0x9a2)[0x83d65f0]
/lib/i686/libc.so.6(__libc_start_main+0xdc)[0xb7d1b75c]
llc(sinh+0x8d)[0x83d4e21]
Aborted

On windows I don't get an assertion, but gdb reports: "no debugging symbols found".

Does anyone else have issues with the debug info ?

-Argiris