[llvm-dev] How to pass a StringRef to a function call inserted as instrumentation? (original) (raw)
陳韋任 via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 28 16:37:13 PDT 2017
- Previous message: [llvm-dev] How to pass a StringRef to a function call inserted as instrumentation?
- Next message: [llvm-dev] How to pass a StringRef to a function call inserted as instrumentation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
StringRef::str().c_str() or StringRef::data()?
2017-04-29 7:32 GMT+08:00 Dipanjan Das via llvm-dev <llvm-dev at lists.llvm.org
:
I am wriitng an LLVM pass to insert instrumentation at certain points of the program. I want to pass the
StringRef
obtained fromgetName()
as a parameter to a functionfunc(char* s)
. I can allocate some space on stack usingAllocaInst
to generate analloca
instruction. But, how can I copy theStringRef
to the stack space? -- Thanks & Regards, Dipanjan
LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170429/9cccca0c/attachment.html>
- Previous message: [llvm-dev] How to pass a StringRef to a function call inserted as instrumentation?
- Next message: [llvm-dev] How to pass a StringRef to a function call inserted as instrumentation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]