Displaying 1 result from an estimated 1 matches for "compile_unit17".
Did you mean:
compile_unit
2009 May 19
1
[LLVMdev] How to get line number and source file name for IR?
...h LLVM IR, I need to
know where this IR code come from (the line number in a source file
name).
An existing way is using -g option to compile my software, then I
can get something as below:
call void @llvm.dbg.stoppoint(i32 9, i32 0, { }* bitcast
(%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit17 to { }*))
I know that the first argument is line number, and the third
argument, the compile unit llvm.dbg.compile_unit17, is mapped to a
source file. I can get the first line number very easily by
"CallSite::arg_iterator" (and represent the first argument with class
Constan...