Inside LLVM, IR debugging information should be used for this purpose. See http://llvm.org/docs/SourceLevelDebugging.html for more details.
llvm-gcc (and DragonEgg) generates everything for you, provided that the same information is available at the GIMPLE level.
source share