On Mon, Jan 11, 2021 at 4:33 PM Ayush Mittal via cfe-users <
cfe-users@lists.llvm.org> wrote:

> Hello Cfe Users,
>
> Could you please point to an effective way to get Source Location details
> from an IR code.
> From the documentation, I think this could be a way:
> Function Pass-> LLVM Value-> MDN->DILocation-> Source Location.
>

Yep, that's about it (I mean, you can do it in a pass, or not - but  yes,
find an llvm::Value and get the debugLoc from that)


> Please include any example if the above approach is correct too.
>
> Thanks and Regards.
> _______________________________________________
> cfe-users mailing list
> cfe-users@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>
_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to