How can I get the line number in the .c or .cpp file for the loop header? For example, in the following loop: for(int i=0; i < n; i++) { a += 1; } I'd like to now the line number of the for(...) line. -- View this message in context: http://old.nabble.com/line-number-of-loop-header-tp31453948p31453948.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Hi Bob,> How can I get the line number in the .c or .cpp file for the loop header? > > For example, in the following loop: > > for(int i=0; i< n; i++) { > a += 1; > } > > I'd like to now the line number of the for(...) line.at the LLVM level you need to use debug info, see http://llvm.org/docs/SourceLevelDebugging.html Ciao, Duncan.