When linking .ll files with llvm-link or llvm-ld, the debug information is corrupted.
As my investigation, alloca instruction, used to hold the debug information, nullifies the debug meta information
The attachments is the patch for it.
Index: lib/Transforms/Utils/ValueMapper.cpp
patch (641 Bytes)