(original) (raw)
StringRef::str().c\_str() or StringRef::data()?
2017-04-29 7:32 GMT+08:00 Dipanjan Das via llvm-dev <llvm-dev@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 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
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
LLVM Developers mailing list
llvm-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/\~chenwj
Homepage: https://people.cs.nctu.edu.tw/\~chenwj