[cfe-dev] operator new

John McCall rjmccall at apple.com
Wed Apr 11 10:15:56 PDT 2012


On Apr 11, 2012, at 7:32 AM, Михаил wrote:
> Is there a way to understand what class(struct) was created by operator new by analysing generated bytecode? 
> 
> I thought that after   %call = tail call noalias i8* @_Znwj(i32 <size>)  is goes bitcast of %call to need struct, but for next example it is wrong.

Nothing you do on LLVM IR here is ever going to be more than a best-effort approximation;  really you should be looking at the AST, not LLVM IR.

John.



More information about the cfe-dev mailing list