title: Is there any apis to initialize my custom class object with llvm transformation pass?if not what is the best strategy to achieve this?
body: <p>I'm implementing a llvm transformation pass.And in some point ,I need to initialize my custom class object and call its methods.
  Let's say for example:</p>
  
  <pre><code> Foo* foo = new Foo(3);                   
   foo-&gt;createSomething(attrCount, foo)
  </code></pre>
  
  <p>i need to insert these instructions.What should I do?
  I think i have to use AllocaInst and then create a function call with IR Builder.But I couldn't able to get it down till now.</p>