[LLVMdev] producing error messages

Brian Ensink ensink at cs.uiuc.edu
Tue Oct 8 17:55:01 PDT 2002


This may be a a long shot but I'll ask anyway. Does LLVM have any 
way of mapping an Instruction or Value back to the original position 
(file, line number) in the source code? I'm writing a pass that among
other things may detect some semantic errors in the way the user uses
a particular API. I would like to report these errors to the user and
identify the location of the error in the original source code.

If LLVM doesn't have this, how would one add it? Maybe this info 
could be stored in an Annotation that the frontend attaches to each 
Instruction it creates?

-- 
Brian Ensink                     www-sal.cs.uiuc.edu/~ensink
Graduate Student, University of Illinois at Urbana-Champaign



More information about the llvm-dev mailing list