[llvm-dev] How to pass a StringRef to a function call inserted as instrumentation?

Dipanjan Das via llvm-dev
Fri, 28 Apr 2017 23:32:16 -0000

I am wriitng an LLVM pass to insert instrumentation at certain points of
the program. I want to pass the `StringRef` obtained from `getName()` as a
parameter to a function `func(char* s)`. I can allocate some space on stack
using `AllocaInst` to generate an `alloca` instruction. But, how can I copy
the `StringRef` to the stack space?

--

Thanks & Regards,
Dipanjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20170428/e211fe2d/attachment.html>