Q Z via llvm-dev
2015-Oct-28 02:24 UTC
[llvm-dev] how to get source code location information in LLVM3.7.0?
could anyone give me some examples to get a instruction's line and filename information in source codes in LLVM3.7.0? thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151028/cd60eb09/attachment.html>
Dylan McKay via llvm-dev
2015-Oct-28 02:41 UTC
[llvm-dev] how to get source code location information in LLVM3.7.0?
Example: Module &M = /* .. */ Instruction &Inst = /* . */ const DebugLoc &DL = Inst.getDebugLoc(); StringRef file = M.getName();unsigned Line = DL.getLine();unsigned Col = DL.getCol(); DebugLoc <http://llvm.org/docs/doxygen/html/classllvm_1_1DebugLoc.html> documentation. Module <http://llvm.org/docs/doxygen/html/classllvm_1_1Module.html> documentation. On Wed, Oct 28, 2015 at 3:24 PM, Q Z via llvm-dev <llvm-dev at lists.llvm.org> 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! > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151028/f404ac75/attachment.html>