I'm recurrently falling into two null pointers when building some LLVM objects: raw_fd_ostream and Twine. On both ctors, the char* is never asserted to point somewhere. I know I have to make sure the string exists, but would be good to get an assert instead of a segfault. It'd reduce debugging time a lot on those cases. Is it against the "LLVM way"? I haven't seen many around... -- cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
On Mar 4, 2010, at 8:20 AM, Renato Golin wrote:> I'm recurrently falling into two null pointers when building some LLVM > objects: raw_fd_ostream and Twine. On both ctors, the char* is never > asserted to point somewhere. > > I know I have to make sure the string exists, but would be good to get > an assert instead of a segfault. It'd reduce debugging time a lot on > those cases.I added the raw_fd_ostream one in r97769. Twine is a low level api which is very performance sensitive, I'd rather not add one to its constructor. -Chris
On 5 March 2010 00:49, Chris Lattner <clattner at apple.com> wrote:> I added the raw_fd_ostream one in r97769.Thanks!> Twine is a low level api which is very performance sensitive, I'd rather not add one to its constructor.Fair enough. ;) cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm