According to the llvm docs, llvm will generate global variable information such as
which contains the line number and original name of global variables. But I tried on llvm-1.8 with -g, no such debug intrinsic functions are dumped, I only see some stoppoint, func.start. Are there any secrete options I should pass to llvm-gcc?
llvm-gcc3 has very primitive support for debug info. Make sure you're using llvm-gcc4.