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

Dipanjan Das via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 28 16:32:16 PDT 2017

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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170428/e211fe2d/attachment.html>

More information about the llvm-dev mailing list