[llvm-dev] How to get return address at llvm ir level?

Bekket McClane via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 5 06:40:58 PDT 2018


Correct...you can always call that intrinsic explicitly. However, I don't
think it would help the original question, since the question is how to get
the return address inside a LLVM Pass, instead of getting the return
address after executing the program with Intrinsic::returnaddress inside.
Also, executing a program containing Intrinsic::returnaddress won't get you
anything - even failed to pass the linking stage - without special support,
since the intrinsic is just a function declaration.

Bests,
Bekket

On Wed, Sep 5, 2018 at 5:00 AM mayuyu.io <admin at mayuyu.io> wrote:

> To my knowledge that intrinsic IS generated by frontends like Clang when
> using _builtin_return_address(), i could be wrong though
>
> Zhang
>
> > 在 2018年9月5日,10:47,Bekket McClane via llvm-dev <llvm-dev at lists.llvm.org>
> 写道:
> >
> > and
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180905/925e22a9/attachment.html>


More information about the llvm-dev mailing list