[llvm] r211184 - Fix a memory leak in the error path.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Jun 18 11:26:07 PDT 2014


> It would be better, I'd wager, because if you go far enough up -
> you'll hopefuly find that each caller actually knows statically
> whether it's owned or not, and this conditionality shouldn't be
> required. But I haven't chased this far enough and I've spent a while
> chatting to Lang about the issues around ownership of MemoryBuffers
> and that it's a rather problematic API/usage.

It will hit a constant at some point. I am not sure for far up we have
to split it.

I will give it a try, but not right now. Do ping me in a day or two if
I don't post a patch.

Incidentally, I noticed this while trying out a patch to cleanup
another use of a isOwned flag, so I agree it is problematic :-(

Cheers,
Rafael



More information about the llvm-commits mailing list