search for: getfromopaqueptr

Displaying 3 results from an estimated 3 matches for "getfromopaqueptr".

2016 Dec 21
2
DeclarationName and the StringRef.
...ed using the IdentifierInfo or Objc Selector or CXXOperatorId etc as argument in the constructor . The code i.e void appendExtern(StringRef Sr) { char *ExternChar = const_cast<char *> (Sr.data()); *Ptr =reinterpret_cast<void *>(ExternChar); this->ExternName = DeclarationName::getFromOpaquePtr(Ptr); } the above is kind of hack ,may result in dangling memory references ,Any thoughts on this ? we thought to change the DeclarationName class ,with adding new DeclarationName constructor ,that construct the DeclarationName instance by StringRef as argument. i.e DeclarationName(StringRef S...
2016 Dec 21
0
DeclarationName and the StringRef.
...bjc Selector or CXXOperatorId etc as argument in the constructor . > > The code i.e > void appendExtern(StringRef Sr) > { > char *ExternChar = const_cast<char *> (Sr.data()); > *Ptr =reinterpret_cast<void *>(ExternChar); > this->ExternName = DeclarationName::getFromOpaquePtr(Ptr); > > } > > the above is kind of hack ,may result in dangling memory references > ,Any thoughts on this ? > > we thought to change the DeclarationName class ,with adding > new DeclarationName constructor ,that construct the DeclarationName > instance by StringRef...
2016 Dec 21
0
DeclarationName and the StringRef.
...pts 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/20161...