how to get source code location information in LLVM3.7.0?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to get source code location information in LLVM3.7.0?

Don Hinton via cfe-dev
could anyone give me some examples to get a instruction's line and filename information in source codes in LLVM3.7.0?

thank you!

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: how to get source code location information in LLVM3.7.0?

Don Hinton via cfe-dev
Hi,

You could see how passes print their remarks. For instance, see lib/Transforms/Scalar/LoopUnrollPass.cpp, lines 1048-1055. You’ll probably be interested in DebugLoc type, and how function emitOptimizationRemarkMissed is implemented.

Michael

On Oct 27, 2015, at 7:17 PM, Q Z via cfe-dev <[hidden email]> wrote:

could anyone give me some examples to get a instruction's line and filename information in source codes in LLVM3.7.0?

thank you!
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev