AllocaInst remapped as NULL in llvm::MapValue

Hello all

When using llvm-ld to link several bitcode files produced by LLVM-GCC, I
ran into the problem that the resulting linked file had missing dbg
entries for AllocaInst values. After some digging I found that
llvm::MapValue returns NULL when it encounters an AllocaInst. The
attached trivial patch fixes the problem.

Is this behaviour intended?


llvm-dont-drop-allocainst.diff (854 Bytes)