[llvm-dev] DeclarationName and the StringRef.
Umesh Kalappa via llvm-dev
llvm-dev at lists.llvm.org
Wed Dec 21 03:04:11 PST 2016
Hi Guys ,
We have the function that accepts StringRef and construct
the DeclarationName instance .
Currenlty we are achieving the same as ,the code snap
void appendExtern(StringRef Sr)
{
char *ExternChar = const_cast<char *> (Sr.data());
*Ptr =reinterpret_cast<void *>(ExternChar);
this->ExternName = DeclarationName::getFromOpaquePtr(Ptr);
}
There is, any better way of achieving this ,because the above code is
crashing intermittently ?
Thank you and any help here appreciated.
~Umesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161221/fb495e4b/attachment.html>
More information about the llvm-dev
mailing list